aboutsummaryrefslogtreecommitdiff
path: root/Lib/d
diff options
context:
space:
mode:
authorDaniel Vollmer <code@maven.de>2016-09-17 10:26:54 +0200
committerDaniel Vollmer <code@maven.de>2016-09-17 10:26:54 +0200
commit2dc87d7485876d8a7a45d8136014695863e186de (patch)
treebc8f219ebeb88ff8da1f0196bdbe048781ee7270 /Lib/d
parentb138f054e516dcab02db066f5d56e2c7eb93c413 (diff)
downloadswig-2dc87d7485876d8a7a45d8136014695863e186de.tar.gz
Add std::bad_cast to std_except.i
This exception occurs when dynamic_cast<T&> fails. Fixes #783.
Diffstat (limited to 'Lib/d')
-rw-r--r--Lib/d/std_except.i1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/d/std_except.i b/Lib/d/std_except.i
index 2b557e5fc..4a0ce6d69 100644
--- a/Lib/d/std_except.i
+++ b/Lib/d/std_except.i
@@ -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;"