constructor_exception.i test case. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4467 626c5289-ae23-0410-ae9c-e8d60b6d4f22
27 lines
311 B
OpenEdge ABL
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 (...) {
|
|
}
|
|
};
|
|
%}
|