0ad/source/scriptinterface
trompetin17 007b4f5db7
Improve error logging for failed JS-to-C++ script conversions
Previously, if a JavaScript function returned a value that failed to
convert to the requested C++ type (e.g., from JS undefined to
std::wstring), the ScriptInterface would fail silently, making debugging
difficult.

This commit improves the error reporting in the script system by logging
the name of the JavaScript function being called when a type conversion
failure occurs. This makes it easier to trace and fix issues arising
from script-side inconsistencies or missing return values.

The improved logging is particularly useful for debugging errors such as
undefined civ values from GetCiv() when used via m_Script.Call<T>().
2025-06-19 08:52:23 -05:00
..
tests Test whether some files are reloaded more directly 2025-06-18 14:42:13 +02:00
FunctionWrapper.h Improve error logging for failed JS-to-C++ script conversions 2025-06-19 08:52:23 -05:00
JSON.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSON.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
ModuleLoader.cpp Disalow importing some files 2025-06-06 17:36:35 +02:00
ModuleLoader.h Disalow importing some files 2025-06-06 17:36:35 +02:00
Object.h Skip redundant HasProperty in GetObjectClassName 2025-05-10 17:08:49 +02:00
Promises.cpp Add final to classes introduced in f9114a87f2 2024-08-25 13:38:09 +02:00
Promises.h Upgrade SpiderMonkey to ESR 115 2024-12-09 10:46:12 +01:00
ScriptContext.cpp Remove the name of some unused arguments 2025-06-18 12:49:59 +02:00
ScriptContext.h Stop running shrinking gcs & simplify GC logic. 2025-04-22 17:03:29 +02:00
ScriptConversions.cpp Remove the name of some unused arguments 2025-06-18 12:49:59 +02:00
ScriptConversions.h Remove the name of some unused arguments 2025-06-18 12:49:59 +02:00
ScriptEngine.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
ScriptExceptions.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
ScriptExceptions.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
ScriptExtraHeaders.h Upgrade SpiderMonkey to ESR 115 2024-12-09 10:46:12 +01:00
ScriptForward.h Upgrade SpiderMonkey to ESR 115 2024-12-09 10:46:12 +01:00
ScriptInterface.cpp Disalow importing some files 2025-06-06 17:36:35 +02:00
ScriptInterface.h Disalow importing some files 2025-06-06 17:36:35 +02:00
ScriptRequest.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
ScriptStats.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
ScriptStats.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
ScriptTypes.h Remove check for SpiderMonkey minor version 2024-12-09 10:46:14 +01:00
StructuredClone.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
StructuredClone.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00