update swig on windows
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
%module constructor_exception
|
||||
|
||||
%inline %{
|
||||
class MyError {
|
||||
};
|
||||
|
||||
class SomeClass {
|
||||
public:
|
||||
SomeClass(int x) {
|
||||
if (x < 0) {
|
||||
throw MyError();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class Test {
|
||||
SomeClass o;
|
||||
public:
|
||||
Test(int x) try : o(x) { }
|
||||
catch (MyError &) {
|
||||
}
|
||||
catch (int) {
|
||||
}
|
||||
catch (...) {
|
||||
}
|
||||
};
|
||||
%}
|
||||
Reference in New Issue
Block a user