From f994bc481def7d16d6b9681fa13cc1704bb11254 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 17 Sep 2013 20:25:19 +0100 Subject: [PATCH] Better workaround for Scilab name problem with 'Error' --- Examples/test-suite/constructor_exception.i | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Examples/test-suite/constructor_exception.i b/Examples/test-suite/constructor_exception.i index 8e08904f8..e3cdc47af 100644 --- a/Examples/test-suite/constructor_exception.i +++ b/Examples/test-suite/constructor_exception.i @@ -1,20 +1,14 @@ %module constructor_exception -#ifdef SWIGSCILAB %inline %{ -#undef Error -%} -#endif - -%inline %{ -class Error { +class MyError { }; class SomeClass { public: SomeClass(int x) { if (x < 0) { - throw Error(); + throw MyError(); } } }; @@ -23,7 +17,7 @@ class Test { SomeClass o; public: Test(int x) try : o(x) { } - catch (Error &) { + catch (MyError &) { } catch (int) { }