Add <typeinfo> header for std::bad_cast

This commit is contained in:
Daniel Vollmer 2016-09-17 13:24:32 +02:00
commit ce1cb85d86
8 changed files with 10 additions and 0 deletions

View file

@ -7,6 +7,7 @@
* ----------------------------------------------------------------------------- */
%{
#include <typeinfo>
#include <stdexcept>
%}

View file

@ -7,6 +7,7 @@
* ----------------------------------------------------------------------------- */
%{
#include <typeinfo>
#include <stdexcept>
%}

View file

@ -258,6 +258,7 @@ SWIGINTERN void SWIG_DThrowException(int code, const char *msg) {
}
*/
%{
#include <typeinfo>
#include <stdexcept>
%}
%define SWIG_CATCH_STDEXCEPT
@ -274,6 +275,8 @@ SWIGINTERN void SWIG_DThrowException(int code, const char *msg) {
SWIG_exception(SWIG_IndexError, e.what() );
} catch (std::runtime_error& e) {
SWIG_exception(SWIG_RuntimeError, e.what() );
} catch (std::bad_cast& e) {
SWIG_exception(SWIG_TypeError, e.what() );
} catch (std::exception& e) {
SWIG_exception(SWIG_SystemError, e.what() );
}

View file

@ -7,6 +7,7 @@
* ----------------------------------------------------------------------------- */
%{
#include <typeinfo>
#include <stdexcept>
%}

View file

@ -7,6 +7,7 @@
* ----------------------------------------------------------------------------- */
%{
#include <typeinfo>
#include <stdexcept>
%}

View file

@ -8,6 +8,7 @@
* ----------------------------------------------------------------------------- */
%{
#include <typeinfo>
#include <stdexcept>
%}
%include <exception.i>

View file

@ -3,6 +3,7 @@
#endif
%{
#include <typeinfo>
#include <stdexcept>
%}

View file

@ -24,6 +24,7 @@
#endif
%{
#include <typeinfo>
#include <stdexcept>
%}