diff --git a/SWIG/Source/Modules/python.cxx b/SWIG/Source/Modules/python.cxx index f2eb9a3bf..9e3b224cd 100644 --- a/SWIG/Source/Modules/python.cxx +++ b/SWIG/Source/Modules/python.cxx @@ -1984,7 +1984,6 @@ public: /* Emit the function call */ if (director_method) { Append(f->code, "try {\n"); - Append(f->code, " Swig::UnknownExceptionHandler dh;\n"); } else { if (allow_thread) { Append(f->code, "{\n"); diff --git a/SWIG/Source/Modules/ruby.cxx b/SWIG/Source/Modules/ruby.cxx index 2db5b41ef..f3dc973f0 100644 --- a/SWIG/Source/Modules/ruby.cxx +++ b/SWIG/Source/Modules/ruby.cxx @@ -1190,7 +1190,6 @@ public: /* Emit the function call */ if (director_method) { Printf(f->code, "try {\n"); - Printf(f->code, " Swig::UnknownExceptionHandler dh;\n"); } emit_action(n,f);