summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python_destructor_exception.i
blob: 150a396de4bce216bf01e2c46e317ecdb7eea17c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* File : example.i */
%module python_destructor_exception
%include exception.i

%exception ClassWithThrowingDestructor::~ClassWithThrowingDestructor()
{
  $action
  SWIG_exception(SWIG_RuntimeError, "I am the ClassWithThrowingDestructor dtor doing bad things");
}

%inline %{
class ClassWithThrowingDestructor
{
};

%}

%include <std_vector.i>
%template(VectorInt) std::vector<int>;