diff options
Diffstat (limited to 'src/script/cpp_api/s_async.cpp')
-rw-r--r-- | src/script/cpp_api/s_async.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/script/cpp_api/s_async.cpp b/src/script/cpp_api/s_async.cpp index 171632633..9bf3fcf49 100644 --- a/src/script/cpp_api/s_async.cpp +++ b/src/script/cpp_api/s_async.cpp @@ -243,8 +243,12 @@ void* AsyncWorkerThread::run() lua_State *L = getStack(); std::string script = getServer()->getBuiltinLuaPath() + DIR_DELIM + "init.lua"; - if (!loadScript(script)) { - FATAL_ERROR("execution of async base environment failed!"); + try { + loadScript(script); + } catch (const ModError &e) { + errorstream << "Execution of async base environment failed: " + << e.what() << std::endl; + FATAL_ERROR("Execution of async base environment failed"); } int error_handler = PUSH_ERROR_HANDLER(L); |