summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/python/director.swg11
-rw-r--r--Lib/ruby/director.swg10
2 files changed, 10 insertions, 11 deletions
diff --git a/Lib/python/director.swg b/Lib/python/director.swg
index 4bdc94dc2..36df302f1 100644
--- a/Lib/python/director.swg
+++ b/Lib/python/director.swg
@@ -219,7 +219,7 @@ namespace Swig {
PyErr_Print();
std::cerr << std::endl;
- std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl
+ std::cerr << "This exception was caught by the SWIG UnknownExceptionHandler." << std::endl
<< "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl
<< std::endl
<< "Exception is being re-thrown, program will likely abort/terminate." << std::endl;
@@ -227,14 +227,13 @@ namespace Swig {
}
public:
-
- std::unexpected_handler old;
- UnknownExceptionHandler(std::unexpected_handler nh = handler) {
- old = std::set_unexpected(nh);
+ std::terminate_handler old;
+ UnknownExceptionHandler(std::terminate_handler nh = handler) {
+ old = std::set_terminate(nh);
}
~UnknownExceptionHandler() {
- std::set_unexpected(old);
+ std::set_terminate(old);
}
#endif
};
diff --git a/Lib/ruby/director.swg b/Lib/ruby/director.swg
index c6c53a343..a0569785f 100644
--- a/Lib/ruby/director.swg
+++ b/Lib/ruby/director.swg
@@ -170,7 +170,7 @@ namespace Swig {
std::cerr << std::endl
<< "Ruby interpreter traceback:" << std::endl;
std::cerr << std::endl;
- std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl
+ std::cerr << "This exception was caught by the SWIG UnknownExceptionHandler." << std::endl
<< "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl
<< std::endl
<< "Exception is being re-thrown, program will like abort/terminate." << std::endl;
@@ -178,13 +178,13 @@ namespace Swig {
}
public:
- std::unexpected_handler old;
- UnknownExceptionHandler(std::unexpected_handler nh = handler) {
- old = std::set_unexpected(nh);
+ std::terminate_handler old;
+ UnknownExceptionHandler(std::terminate_handler nh = handler) {
+ old = std::set_terminate(nh);
}
~UnknownExceptionHandler() {
- std::set_unexpected(old);
+ std::set_terminate(old);
}
#endif
};