Commit 81343758 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie

Added try/catch lines for successcallbacks as are in stable.

parent 0a6c47ee
......@@ -172,16 +172,16 @@ function sendjsonrequest(script, data, rtype, successcallback, errorcallback, qu
if (!quiet) {
displayMessage(data.message, errtype);
}
successcallback(data);
try { successcallback(data); } catch (e) { logError('sendjsonrequest() callback failed: ', e, data); }
}
else if (data.message && typeof(data.message == 'object')) {
if (data.message.message && typeof(data.message.message == 'string') && !quiet) {
displayMessage(data.message.message, errtype);
}
successcallback(data.message);
try { successcallback(data.message); } catch (e) { logError('sendjsonrequest() callback failed: ', e, data); }
}
else {
successcallback(data);
try { successcallback(data); } catch (e) { logError('sendjsonrequest() callback failed: ', e, data); }
}
processingStop();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment