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