Permalink
Browse files

Only set exception after function call if not set

  • Loading branch information...
1 parent 5f90f23 commit 00df0a8dbde4cf2c0a132ace32b85b848fdde8d1 @lericson lericson committed Oct 5, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 spidermonkey/jsfunction.c
@@ -101,7 +101,9 @@ Function_call(Function* self, PyObject* args, PyObject* kwargs)
if(!JS_CallFunctionValue(cx, parent, func, argc, argv, &rval))
{
- PyErr_SetString(PyExc_RuntimeError, "Failed to execute JS Function.");
+ if(!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_RuntimeError, "JavaScript Function failed to execute");
+ }
goto error;
}

0 comments on commit 00df0a8

Please sign in to comment.