diff --git a/src/api/CMakeLists.txt b/src/api/CMakeLists.txt index 086ed1822..38a09b631 100644 --- a/src/api/CMakeLists.txt +++ b/src/api/CMakeLists.txt @@ -44,7 +44,6 @@ z3_add_component(api api_context.cpp api_datalog.cpp api_datatype.cpp - api_debug.cpp api_fpa.cpp api_goal.cpp api_log.cpp diff --git a/src/api/api_context.cpp b/src/api/api_context.cpp index 344224dd3..2f1f50712 100644 --- a/src/api/api_context.cpp +++ b/src/api/api_context.cpp @@ -18,6 +18,7 @@ Revision History: --*/ #include +#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(alloc(api::context, reinterpret_cast(c), true)); RETURN_Z3(r); Z3_CATCH_RETURN_NO_HANDLE(nullptr); diff --git a/src/api/api_debug.cpp b/src/api/api_debug.cpp deleted file mode 100644 index a5cfed9ac..000000000 --- a/src/api/api_debug.cpp +++ /dev/null @@ -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); - } -} \ No newline at end of file diff --git a/src/api/python/z3/z3.py b/src/api/python/z3/z3.py index 76777223b..9a3dadda2 100644 --- a/src/api/python/z3/z3.py +++ b/src/api/python/z3/z3.py @@ -316,11 +316,6 @@ def get_param(name): return r 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 diff --git a/src/api/z3_api.h b/src/api/z3_api.h index 6bb97a676..cbf9803db 100644 --- a/src/api/z3_api.h +++ b/src/api/z3_api.h @@ -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 } #endif // __cplusplus