16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 22:39:18 +02:00

fix lua error handling

This commit is contained in:
milek7
2019-02-19 20:29:02 +01:00
parent 01ff1cc217
commit 32e79f7b06
3 changed files with 13 additions and 6 deletions

View File

@@ -1851,8 +1851,12 @@ lua_event::deserialize_( cParser &Input, scene::scratch_data &Scratchpad ) {
// run() subclass details
void
lua_event::run_() {
if (lua_func)
lua_func(this, m_activator);
try {
if (lua_func)
lua_func(this, m_activator);
} catch (...) {
ErrorLog(simulation::Lua.get_error());
}
}
// export_as_text() subclass details