0ad/source/ps/scripting
wraitii 25490bfec3 Improve JS Exception handling.
- Check for pending exceptions after function calls and script
executions.
- Call LOGERROR instead of JS_ReportError when there is a conversion
error in FromJSVal, since that can only be called from C++ (where JS
errors don't really make sense). Instead, C++ callers of FromJSVal
should handle the failure and, themselves, either report an error or
simply do something else.
- Wrap JS_ReportError since that makes updating it later easier.

This isn't a systematical fix since ToJSVal also ought return a boolean
for failures, and we probably should trigger errors instead of warnings
on 'implicit' conversions, rather a preparation diff.

Part of the SM52 migration, stage: SM45 compatible (actually SM52
incompatible, too).

Based on a patch by: Itms
Comments by: Vladislavbelov, Stan`
Refs #742, #4893

Differential Revision: https://code.wildfiregames.com/D3093
This was SVN commit r24187.
2020-11-15 18:29:17 +00:00
..
JSInterface_ConfigDB.cpp Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_ConfigDB.h Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_Console.cpp Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_Console.h Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_Debug.cpp Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_Debug.h Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_Game.cpp Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
JSInterface_Game.h Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_Main.cpp Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
JSInterface_Main.h Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_Mod.cpp Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_Mod.h Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_ModIo.cpp Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
JSInterface_ModIo.h Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_SavedGame.cpp Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
JSInterface_SavedGame.h Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_UserReport.cpp Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_UserReport.h Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_VFS.cpp Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
JSInterface_VFS.h Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_VisualReplay.cpp Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
JSInterface_VisualReplay.h Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00