diff --git a/source/gui/IGUIObject.cpp b/source/gui/IGUIObject.cpp index bf0681a643..bf94d9cdc8 100644 --- a/source/gui/IGUIObject.cpp +++ b/source/gui/IGUIObject.cpp @@ -516,7 +516,8 @@ void IGUIObject::ScriptEvent(const CStr& Action) JSBool ok = JS_CallFunctionValue(g_ScriptingHost.getContext(), GetJSObject(), OBJECT_TO_JSVAL(*it->second), ARRAY_SIZE(paramData), paramData, &result); if (!ok) { - JS_ReportError(g_ScriptingHost.getContext(), "Errors executing script action \"%s\"", Action.c_str()); + // We have no way to propagate the script exception, so just ignore it + // and hope the caller checks JS_IsExceptionPending } } diff --git a/source/gui/scripting/JSInterface_IGUIObject.cpp b/source/gui/scripting/JSInterface_IGUIObject.cpp index 442ab0856a..cbab227113 100644 --- a/source/gui/scripting/JSInterface_IGUIObject.cpp +++ b/source/gui/scripting/JSInterface_IGUIObject.cpp @@ -578,7 +578,7 @@ JSBool JSI_IGUIObject::setProperty(JSContext* cx, JSObject* obj, jsid id, jsval* break; } - return JS_TRUE; + return !JS_IsExceptionPending(cx); }