mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix script error reporting a bit
This commit is contained in:
parent
9344816bd6
commit
581f950e10
5 changed files with 48 additions and 8 deletions
|
@ -35,10 +35,11 @@ void script_error(lua_State *L, const char *fmt, ...)
|
|||
{
|
||||
va_list argp;
|
||||
va_start(argp, fmt);
|
||||
vfprintf(stderr, fmt, argp);
|
||||
char buf[10000];
|
||||
vsnprintf(buf, 10000, fmt, argp);
|
||||
va_end(argp);
|
||||
lua_close(L);
|
||||
exit(EXIT_FAILURE);
|
||||
//errorstream<<"SCRIPT ERROR: "<<buf;
|
||||
throw LuaError(buf);
|
||||
}
|
||||
|
||||
bool script_load(lua_State *L, const char *path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue