Let exceptions in GUI script events triggered by script setters propagate out of the setter, so error messages aren't useless.

This was SVN commit r8997.
This commit is contained in:
Ykkrosh
2011-02-27 17:57:32 +00:00
parent eb163c8d24
commit d045258c29
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -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
}
}