diff options
author | ajrhacker <ajrhacker@users.noreply.github.com> | 2021-04-27 12:07:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-27 12:07:12 -0400 |
commit | 37b6d7797b0dd1fa3d4ea31815efdc747c549b6a (patch) | |
tree | 960760a1336814424bfa270862d7e32984397bad | |
parent | 2d56b20b21b68841adbea5c326bee6f66068760c (diff) | |
parent | 2db86e2e9c8520e273aa8e7ddee3965198e266f5 (diff) |
Merge pull request #8001 from Szunti/emu.thread_error_messages
Add a couple error messages to emu.thread.
-rw-r--r-- | src/frontend/mame/luaengine.cpp | 10 |
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; }); |