Add std::bad_cast to std_except.i
This exception occurs when dynamic_cast<T&> fails. Fixes #783.
This commit is contained in:
parent
b138f054e5
commit
2dc87d7485
9 changed files with 12 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ namespace std
|
|||
// normally objects which are thrown are returned to the interpreter as errors
|
||||
// (which potentially may have problems if they are not copied)
|
||||
// therefore all classes based upon std::exception are converted to their strings & returned as errors
|
||||
%typemap(throws) std::bad_cast "SWIG_exception(SWIG_TypeError, $1.what());"
|
||||
%typemap(throws) std::bad_exception "SWIG_exception(SWIG_RuntimeError, $1.what());"
|
||||
%typemap(throws) std::domain_error "SWIG_exception(SWIG_ValueError, $1.what());"
|
||||
%typemap(throws) std::exception "SWIG_exception(SWIG_SystemError, $1.what());"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue