1
0
Fork 0
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:
Desour 2025-02-21 11:11:51 +01:00
parent 31513cac6e
commit d8435dcf8d
7 changed files with 47 additions and 14 deletions

View file

@ -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;