3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-27 08:28:44 +00:00

use std::exception as base class to z3_exception

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2024-11-04 11:08:15 -08:00
parent 1957b4d991
commit 92065462b4
60 changed files with 109 additions and 111 deletions

View file

@ -416,7 +416,7 @@ int STD_CALL main(int argc, char ** argv) {
}
catch (z3_exception & ex) {
// unhandled exception
std::cerr << "ERROR: " << ex.msg() << "\n";
std::cerr << "ERROR: " << ex.what() << "\n";
if (ex.has_error_code())
return ex.error_code();
else

View file

@ -134,7 +134,7 @@ static unsigned parse_opt(std::istream& in, opt_format f) {
}
}
catch (z3_exception & ex) {
std::cerr << ex.msg() << "\n";
std::cerr << ex.what() << "\n";
}
display_statistics();
display_model();

View file

@ -31,7 +31,7 @@ static void solve(char const * stream_name, std::istream & in) {
r.parse();
}
catch (z3_exception & ex) {
std::cerr << "Error at line " << r.get_line() << ": " << ex.msg() << std::endl;
std::cerr << "Error at line " << r.get_line() << ": " << ex.what() << std::endl;
}
clock_t end_time = clock();
memory::display_max_usage(std::cout);