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>
|
#include <stdexcept>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
#include <typeinfo>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -258,6 +258,7 @@ SWIGINTERN void SWIG_DThrowException(int code, const char *msg) {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
%{
|
%{
|
||||||
|
#include <typeinfo>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
%}
|
%}
|
||||||
%define SWIG_CATCH_STDEXCEPT
|
%define SWIG_CATCH_STDEXCEPT
|
||||||
|
|
@ -274,6 +275,8 @@ SWIGINTERN void SWIG_DThrowException(int code, const char *msg) {
|
||||||
SWIG_exception(SWIG_IndexError, e.what() );
|
SWIG_exception(SWIG_IndexError, e.what() );
|
||||||
} catch (std::runtime_error& e) {
|
} catch (std::runtime_error& e) {
|
||||||
SWIG_exception(SWIG_RuntimeError, e.what() );
|
SWIG_exception(SWIG_RuntimeError, e.what() );
|
||||||
|
} catch (std::bad_cast& e) {
|
||||||
|
SWIG_exception(SWIG_TypeError, e.what() );
|
||||||
} catch (std::exception& e) {
|
} catch (std::exception& e) {
|
||||||
SWIG_exception(SWIG_SystemError, e.what() );
|
SWIG_exception(SWIG_SystemError, e.what() );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
#include <typeinfo>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
#include <typeinfo>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
#include <typeinfo>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
%}
|
%}
|
||||||
%include <exception.i>
|
%include <exception.i>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
#include <typeinfo>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
#include <typeinfo>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue