mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 18:31:49 +00:00
catch and print exceptions in Z3_mk_config instead of letting them
bubble up the stack
This commit is contained in:
parent
4686429318
commit
29a28f544d
|
@ -68,10 +68,17 @@ extern "C" {
|
|||
}
|
||||
|
||||
Z3_config Z3_API Z3_mk_config(void) {
|
||||
memory::initialize(UINT_MAX);
|
||||
LOG_Z3_mk_config();
|
||||
Z3_config r = reinterpret_cast<Z3_config>(alloc(context_params));
|
||||
RETURN_Z3(r);
|
||||
try {
|
||||
memory::initialize(UINT_MAX);
|
||||
LOG_Z3_mk_config();
|
||||
Z3_config r = reinterpret_cast<Z3_config>(alloc(context_params));
|
||||
RETURN_Z3(r);
|
||||
} catch (z3_exception & ex) {
|
||||
// The error handler is only available for contexts
|
||||
// Just throw a warning.
|
||||
warning_msg("%s", ex.msg());
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void Z3_API Z3_del_config(Z3_config c) {
|
||||
|
|
Loading…
Reference in a new issue