0ad/source/simulation2
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
..
components Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
docs Replace deprecated jsval with JS::Value. 2017-08-28 10:27:36 +00:00
helpers Avoid overflow in UnitMotion. 2020-11-09 13:25:50 +00:00
scripting Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
serialization Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
system Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
tests Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
MessageTypes.h UnitMotion - Send messages to UnitAI when obstructed, to allow stopping early when walking and avoiding pathfinding lag. 2019-07-22 18:07:24 +00:00
Simulation2.cpp Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
Simulation2.h Rename ScriptRuntime to ScriptContext 2020-11-14 10:57:50 +00:00
TypeList.h Store turret positions in map files. 2020-11-11 19:40:44 +00:00