Add std::bad_cast to std_except.i

This exception occurs when dynamic_cast<T&> fails.

Fixes #783.
This commit is contained in:
Daniel Vollmer 2016-09-17 10:26:54 +02:00
commit 2dc87d7485
9 changed files with 12 additions and 0 deletions

View file

@ -16,6 +16,7 @@ namespace std
struct exception {};
}
%typemap(throws, canthrow=1) std::bad_cast "SWIG_DSetPendingException(SWIG_DException, $1.what());\n return $null;"
%typemap(throws, canthrow=1) std::bad_exception "SWIG_DSetPendingException(SWIG_DException, $1.what());\n return $null;"
%typemap(throws, canthrow=1) std::domain_error "SWIG_DSetPendingException(SWIG_DException, $1.what());\n return $null;"
%typemap(throws, canthrow=1) std::exception "SWIG_DSetPendingException(SWIG_DException, $1.what());\n return $null;"