mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-30 19:22:14 +00:00
some error handling stuff
This commit is contained in:
parent
31513cac6e
commit
d8435dcf8d
7 changed files with 47 additions and 14 deletions
|
@ -24,7 +24,13 @@ void *SSCSMEnvironment::run()
|
|||
break;
|
||||
}
|
||||
|
||||
next_event->exec(this);
|
||||
try {
|
||||
next_event->exec(this);
|
||||
} catch (LuaError &e) {
|
||||
setFatalError(std::string("Lua error: ") + e.what());
|
||||
} catch (ModError &e) {
|
||||
setFatalError(std::string("Mod error: ") + e.what());
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue