3
0
Fork 0
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:
Steven Moy 2024-03-27 19:06:58 -07:00 committed by GitHub
parent c18a42cf5b
commit 111fcb9366
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 47 additions and 5 deletions

View file

@ -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);