summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/luaengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/luaengine.cpp')
-rw-r--r--src/frontend/mame/luaengine.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index c7800f70829..ea0ad8fc3b9 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -959,8 +959,16 @@ void lua_engine::initialize()
if (tmp != nullptr)
ctx.result = tmp;
else
- exit(0);
+ osd_printf_error("[LUA ERROR] in thread: return value must be string\n");
}
+ else {
+ sol::error err = ret;
+ osd_printf_error("[LUA ERROR] in thread: %s\n", err.what());
+ }
+ }
+ else {
+ sol::error err = res;
+ osd_printf_error("[LUA ERROR] when loading script for thread: %s\n", err.what());
}
ctx.busy = false;
});