summaryrefslogtreecommitdiff
path: root/Lib/go
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/go
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/go')
-rw-r--r--Lib/go/std_except.i1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/go/std_except.i b/Lib/go/std_except.i
index 789a335f7..9439120e6 100644
--- a/Lib/go/std_except.i
+++ b/Lib/go/std_except.i
@@ -16,6 +16,7 @@ namespace std
struct exception {};
}
+%typemap(throws) std::bad_cast %{_swig_gopanic($1.what());%}
%typemap(throws) std::bad_exception %{_swig_gopanic($1.what());%}
%typemap(throws) std::domain_error %{_swig_gopanic($1.what());%}
%typemap(throws) std::exception %{_swig_gopanic($1.what());%}