3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-01 00:43:18 +00:00

Turn on exit_action_to_throw_exception upon API context creation

This commit is contained in:
Steven Moy 2024-03-27 10:10:15 -07:00
parent 1c43da6663
commit eae6814fce
5 changed files with 2 additions and 21 deletions

View file

@ -44,7 +44,6 @@ z3_add_component(api
api_context.cpp api_context.cpp
api_datalog.cpp api_datalog.cpp
api_datatype.cpp api_datatype.cpp
api_debug.cpp
api_fpa.cpp api_fpa.cpp
api_goal.cpp api_goal.cpp
api_log.cpp api_log.cpp

View file

@ -18,6 +18,7 @@ Revision History:
--*/ --*/
#include<typeinfo> #include<typeinfo>
#include "util/debug.h"
#include "util/z3_version.h" #include "util/z3_version.h"
#include "api/api_context.h" #include "api/api_context.h"
#include "ast/ast_pp.h" #include "ast/ast_pp.h"
@ -393,6 +394,7 @@ extern "C" {
Z3_TRY; Z3_TRY;
LOG_Z3_mk_context_rc(c); LOG_Z3_mk_context_rc(c);
memory::initialize(UINT_MAX); 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)); Z3_context r = reinterpret_cast<Z3_context>(alloc(api::context, reinterpret_cast<ast_context_params*>(c), true));
RETURN_Z3(r); RETURN_Z3(r);
Z3_CATCH_RETURN_NO_HANDLE(nullptr); Z3_CATCH_RETURN_NO_HANDLE(nullptr);

View file

@ -1,8 +0,0 @@
#include "api/z3.h"
#include "util/util.h"
extern "C" {
void Z3_API Z3_set_exit_action_to_throw_exception() {
set_default_exit_action(exit_action::throw_exception);
}
}

View file

@ -316,11 +316,6 @@ def get_param(name):
return r return r
raise Z3Exception("failed to retrieve value for '%s'" % name) raise Z3Exception("failed to retrieve value for '%s'" % name)
def set_exit_action_to_throw_exception():
"""Set the debug exit action to throw exception"""
Z3_set_exit_action_to_throw_exception()
######################################### #########################################
# #
# ASTs base class # ASTs base class

View file

@ -7455,13 +7455,6 @@ extern "C" {
/**@}*/ /**@}*/
/**
\brief Set exit action to throw exception.
def_API('Z3_set_exit_action_to_throw_exception', VOID, ())
*/
void Z3_API Z3_set_exit_action_to_throw_exception();
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif // __cplusplus #endif // __cplusplus