| 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() |
nothing calls this directly
no test coverage detected