swig/Examples/test-suite/constructor_exception.i
2004-09-01 22:24:24 +00:00

27 lines
308 B
OpenEdge ABL

%module constructor_exception
%inline %{
class Error {
};
class SomeClass {
public:
SomeClass(int x) {
if (x < 0) {
throw Error();
}
}
};
class Test {
SomeClass o;
public:
Test(int x) try : o(x) { }
catch (Error &) {
}
catch (int) {
}
catch (...) {
}
};
%}