mirror of
https://github.com/holub/mame
synced 2025-05-29 17:13:05 +03:00
Add a couple error messages to emu.thread.
Also changes exit(0) when the script of the thread returns non-string to an error message instead. exit stops the whole process not just the thread.
This commit is contained in:
parent
db9e4f9449
commit
2db86e2e9c
@ -959,8 +959,16 @@ void lua_engine::initialize()
|
|||||||
if (tmp != nullptr)
|
if (tmp != nullptr)
|
||||||
ctx.result = tmp;
|
ctx.result = tmp;
|
||||||
else
|
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;
|
ctx.busy = false;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user