1 /* File : example.i */
2 %module python_destructor_exception
3 %include exception.i
4 
5 %exception ClassWithThrowingDestructor::~ClassWithThrowingDestructor()
6 {
7   $action
8   SWIG_exception(SWIG_RuntimeError, "I am the ClassWithThrowingDestructor dtor doing bad things");
9 }
10 
11 %inline %{
12 class ClassWithThrowingDestructor
13 {
14 };
15 
16 %}
17 
18 %include <std_vector.i>
19 %template(VectorInt) std::vector<int>;
20