diff --git a/SWIG/Lib/swig.swg b/SWIG/Lib/swig.swg index 408f53172..de15542d7 100644 --- a/SWIG/Lib/swig.swg +++ b/SWIG/Lib/swig.swg @@ -59,8 +59,13 @@ /* Common features */ +#ifdef SWIGCSHARP +#define %exception %feature("except", canthrow=1) +#else #define %exception %feature("except") +#endif #define %noexception %feature("except","") + #define %newobject %feature("new") /* Warnings */