MCPcopy Create free account
hub / github.com/MergHQ/CRYENGINE / cutsom_lua_panic

Function cutsom_lua_panic

Code/CryEngine/CryScriptSystem/ScriptSystem.cpp:246–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244#endif // USE_RAW_LUA_ALLOCS
245 }
246 static int cutsom_lua_panic(lua_State* L)
247 {
248 ScriptWarning("PANIC: unprotected error during Lua-API call\nLua error string: '%s'", lua_tostring(L, -1));
249 DumpCallStack(L);
250
251 // from lua docs:
252 //
253 // "Lua calls a panic function and then calls exit(EXIT_FAILURE), thus exiting the host application."
254 //
255 // so we might as well fatal error here - at least we can inform the user, create a crash dump and fill out a jira bug etc...
256 CryFatalError("PANIC: unprotected error during Lua-API call\nLua error string: '%s'", lua_tostring(L, -1));
257
258 return 0;
259 }
260
261 // Random function used by lua.
262 float script_frand0_1()

Callers

nothing calls this directly

Calls 3

ScriptWarningFunction · 0.85
DumpCallStackFunction · 0.85
CryFatalErrorFunction · 0.85

Tested by

no test coverage detected