mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
Implement API to set exit action to exception (#7192)
* Implement API to set exit action to exception * Turn on exit_action_to_throw_exception upon API context creation
This commit is contained in:
parent
c18a42cf5b
commit
111fcb9366
3 changed files with 47 additions and 5 deletions
|
@ -18,6 +18,7 @@ Revision History:
|
|||
|
||||
--*/
|
||||
#include<typeinfo>
|
||||
#include "util/debug.h"
|
||||
#include "util/z3_version.h"
|
||||
#include "api/api_context.h"
|
||||
#include "ast/ast_pp.h"
|
||||
|
@ -393,6 +394,7 @@ extern "C" {
|
|||
Z3_TRY;
|
||||
LOG_Z3_mk_context_rc(c);
|
||||
memory::initialize(UINT_MAX);
|
||||
set_default_exit_action(exit_action::throw_exception);
|
||||
Z3_context r = reinterpret_cast<Z3_context>(alloc(api::context, reinterpret_cast<ast_context_params*>(c), true));
|
||||
RETURN_Z3(r);
|
||||
Z3_CATCH_RETURN_NO_HANDLE(nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue