Add <typeinfo> header for std::bad_cast
This commit is contained in:
parent
2dc87d7485
commit
ce1cb85d86
8 changed files with 10 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
%{
|
||||
#include <typeinfo>
|
||||
#include <stdexcept>
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
%{
|
||||
#include <typeinfo>
|
||||
#include <stdexcept>
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -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() );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
%{
|
||||
#include <typeinfo>
|
||||
#include <stdexcept>
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
%{
|
||||
#include <typeinfo>
|
||||
#include <stdexcept>
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
%{
|
||||
#include <typeinfo>
|
||||
#include <stdexcept>
|
||||
%}
|
||||
%include <exception.i>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#endif
|
||||
|
||||
%{
|
||||
#include <typeinfo>
|
||||
#include <stdexcept>
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#endif
|
||||
|
||||
%{
|
||||
#include <typeinfo>
|
||||
#include <stdexcept>
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue