]> Creatis software - gdcm.git/blobdiff - Testing/ExceptionAndPython/foo.cxx.orig
* python/distutilsSwigCPlusPlus.py now properly collects the
[gdcm.git] / Testing / ExceptionAndPython / foo.cxx.orig
diff --git a/Testing/ExceptionAndPython/foo.cxx.orig b/Testing/ExceptionAndPython/foo.cxx.orig
new file mode 100644 (file)
index 0000000..fbb8d58
--- /dev/null
@@ -0,0 +1,16 @@
+#include <iostream>
+
+namespace MyError {
+       struct MyException {
+               MyException() { cout << "In exception" << endl; }
+       };
+}
+
+void Thrower(void) {
+       throw MyError::MyException();
+}
+
+void MyWrappedFunction(void) {
+   try { Thrower(); }
+   catch (MyError::MyException) { cout<<"Exception caught in caller"<<endl; }
+}