While trying to build our game for webgl I encounter time to time different webgl only errors in runtime. For example, look at this error.
Error message
[Error] ArgumentOutOfRangeException: Argument is out of range.
_JS_Log_Dump (Game.js, line 10190)
_JS_Log_Dump__wrapper (Game.js, line 8980411)
dynCall_vii (Game.js, line 8979005)
invoke_vii (Game.js, line 16402)
__Z40DebugStringToFilePostprocessedStacktracePKcS0_S0_iS0_iiiiPFvRK11CppLogEntryE (Game.js, line 1812062)
dynCall_viiiiiiiiii (Game.js, line 8979089)
invoke_viiiiiiiiii (Game.js, line 16510)
__ZN9Scripting12LogExceptionEP18ScriptingExceptioniRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE (Game.js, line 1680469)
dynCall_viii (Game.js, line 8978011)
invoke_viii (Game.js, line 15124)
__ZN19ScriptingInvocation6InvokeEPP18ScriptingExceptionb (Game.js, line 1667804)
__ZN19ScriptingInvocation6InvokeEPP18ScriptingException (Game.js, line 1667731)
__ZN19ScriptingInvocation6InvokeIbEET_PP18ScriptingException (Game.js, line 1667713)
__ZN9Coroutine3RunEv (Game.js, line 1645761)
__ZN9Coroutine17ContinueCoroutineEP6ObjectPv (Game.js, line 1645709)
__ZN18DelayedCallManager6UpdateEi (Game.js, line 1236221)
dynCall_vii (Game.js, line 8979005)
invoke_vii (Game.js, line 16402)
__Z10PlayerLoopbbP10IHookEvent (Game.js, line 1507907)
__ZL8mainloopv (Game.js, line 2469624)
dynCall_v (Game.js, line 8979502)
dynCall (Game.js, line 270)
(anonymous function) (Game.js, line 10345)
runIter (Game.js, line 6924)
Browser_mainLoop_runner (Game.js, line 10341)
This is from development build with fast and slow optimisation level (couldn’t make fastest optimisation level build).
And you see the problem. Somewhere in project I got ArgumentOutOfRangeException. And this message doesn’t help me to spot the problem. Is it possible to make this errors more informative?