mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
use std::exception as base class to z3_exception
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
1957b4d991
commit
92065462b4
60 changed files with 109 additions and 111 deletions
|
@ -36,7 +36,7 @@ extern "C" {
|
|||
catch (z3_exception & ex) {
|
||||
// The error handler is only available for contexts
|
||||
// Just throw a warning.
|
||||
warning_msg("%s", ex.msg());
|
||||
warning_msg("%s", ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ extern "C" {
|
|||
catch (z3_exception & ex) {
|
||||
// The error handler is only available for contexts
|
||||
// Just throw a warning.
|
||||
warning_msg("%s", ex.msg());
|
||||
warning_msg("%s", ex.what());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ extern "C" {
|
|||
} catch (z3_exception & ex) {
|
||||
// The error handler is only available for contexts
|
||||
// Just throw a warning.
|
||||
warning_msg("%s", ex.msg());
|
||||
warning_msg("%s", ex.what());
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ extern "C" {
|
|||
catch (z3_exception & ex) {
|
||||
// The error handler is only available for contexts
|
||||
// Just throw a warning.
|
||||
warning_msg("%s", ex.msg());
|
||||
warning_msg("%s", ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -306,7 +306,7 @@ namespace api {
|
|||
set_error_code(Z3_MEMOUT_FAIL, nullptr);
|
||||
break;
|
||||
case ERR_PARSER:
|
||||
set_error_code(Z3_PARSER_ERROR, ex.msg());
|
||||
set_error_code(Z3_PARSER_ERROR, ex.what());
|
||||
break;
|
||||
case ERR_INI_FILE:
|
||||
set_error_code(Z3_INVALID_ARG, nullptr);
|
||||
|
@ -320,7 +320,7 @@ namespace api {
|
|||
}
|
||||
}
|
||||
else {
|
||||
set_error_code(Z3_EXCEPTION, ex.msg());
|
||||
set_error_code(Z3_EXCEPTION, ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ extern "C" {
|
|||
}
|
||||
r = l_undef;
|
||||
if (!mk_c(c)->m().inc()) {
|
||||
to_optimize_ptr(o)->set_reason_unknown(ex.msg());
|
||||
to_optimize_ptr(o)->set_reason_unknown(ex.what());
|
||||
}
|
||||
else {
|
||||
mk_c(c)->handle_exception(ex);
|
||||
|
@ -364,7 +364,7 @@ extern "C" {
|
|||
}
|
||||
}
|
||||
catch (z3_exception& e) {
|
||||
errstrm << e.msg();
|
||||
errstrm << e.what();
|
||||
ctx = nullptr;
|
||||
SET_ERROR_CODE(Z3_PARSER_ERROR, errstrm.str());
|
||||
return;
|
||||
|
|
|
@ -144,7 +144,7 @@ extern "C" {
|
|||
catch (z3_exception& e) {
|
||||
if (owned)
|
||||
ctx = nullptr;
|
||||
errstrm << e.msg();
|
||||
errstrm << e.what();
|
||||
SET_ERROR_CODE(Z3_PARSER_ERROR, errstrm.str());
|
||||
return of_ast_vector(v);
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ extern "C" {
|
|||
}
|
||||
}
|
||||
catch (z3_exception& e) {
|
||||
if (ous.str().empty()) ous << e.msg();
|
||||
if (ous.str().empty()) ous << e.what();
|
||||
SET_ERROR_CODE(Z3_PARSER_ERROR, ous.str());
|
||||
RETURN_Z3(mk_c(c)->mk_external_string(ous.str()));
|
||||
}
|
||||
|
|
|
@ -533,7 +533,7 @@ struct z3_replayer::imp {
|
|||
throw;
|
||||
}
|
||||
catch (z3_exception & ex) {
|
||||
std::cout << "[z3 exception]: " << ex.msg() << std::endl;
|
||||
std::cout << "[z3 exception]: " << ex.what() << std::endl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue