mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-13 15:34:37 +00:00
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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user