diff --git a/Source/Modules/javascript.cxx b/Source/Modules/javascript.cxx index d2b33b1b4..31576bd93 100644 --- a/Source/Modules/javascript.cxx +++ b/Source/Modules/javascript.cxx @@ -1575,7 +1575,8 @@ void JSCEmitter::marshalInputArgs(Node *n, ParmList *parms, Wrapper *wrapper, Ma Printf(arg, "argv[%d]", i); break; default: - throw "Illegal state."; + Printf(stdout, "Illegal state."); + SWIG_exit(EXIT_FAILURE); } tm = emitInputTypemap(n, p, wrapper, arg); Delete(arg); @@ -2212,7 +2213,8 @@ void V8Emitter::marshalInputArgs(Node *n, ParmList *parms, Wrapper *wrapper, Mar Printf(arg, "args[%d]", i); break; default: - throw "Illegal state."; + Printf(stdout, "Illegal state."); + SWIG_exit(EXIT_FAILURE); } tm = emitInputTypemap(n, p, wrapper, arg);