mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Handle LuaErrors in Lua -> C++ calls on LuaJIT
This commit is contained in:
parent
38d112033b
commit
49cec3f782
18 changed files with 113 additions and 134 deletions
10
src/game.cpp
10
src/game.cpp
|
@ -3438,14 +3438,12 @@ void the_game(
|
|||
L" running a different version of Minetest.";
|
||||
errorstream<<wide_to_narrow(error_message)<<std::endl;
|
||||
}
|
||||
catch(ServerError &e)
|
||||
{
|
||||
catch(ServerError &e) {
|
||||
error_message = narrow_to_wide(e.what());
|
||||
errorstream<<wide_to_narrow(error_message)<<std::endl;
|
||||
errorstream << "ServerError: " << e.what() << std::endl;
|
||||
}
|
||||
catch(ModError &e)
|
||||
{
|
||||
errorstream<<e.what()<<std::endl;
|
||||
catch(ModError &e) {
|
||||
errorstream << "ModError: " << e.what() << std::endl;
|
||||
error_message = narrow_to_wide(e.what()) + wgettext("\nCheck debug.txt for details.");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue