aboutsummaryrefslogtreecommitdiff
path: root/src/script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script.cpp')
-rw-r--r--src/script.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/script.cpp b/src/script.cpp
index 16d8030d6..5a6c98026 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -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)