swig/Examples/test-suite/constructor_exception.i
Logan Johnson 40fa3e289d Changed the class name from Object to SomeClass in the
constructor_exception.i test case.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4467 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-07 18:30:06 +00:00

27 lines
311 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 &e) {
}
catch (int y) {
}
catch (...) {
}
};
%}