From 5f342aa0154e59503fbb22e46ac95ef655aaad1a Mon Sep 17 00:00:00 2001 From: est31 Date: Mon, 26 Oct 2015 04:13:27 +0100 Subject: Remove some abort() calls abort() doesn't benefit from the high level abstractions from FATAL_ERROR. --- src/script/cpp_api/s_async.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/script/cpp_api/s_async.cpp') diff --git a/src/script/cpp_api/s_async.cpp b/src/script/cpp_api/s_async.cpp index d18ff6e8c..171632633 100644 --- a/src/script/cpp_api/s_async.cpp +++ b/src/script/cpp_api/s_async.cpp @@ -244,17 +244,14 @@ void* AsyncWorkerThread::run() std::string script = getServer()->getBuiltinLuaPath() + DIR_DELIM + "init.lua"; if (!loadScript(script)) { - errorstream << "execution of async base environment failed!" - << std::endl; - abort(); + FATAL_ERROR("execution of async base environment failed!"); } int error_handler = PUSH_ERROR_HANDLER(L); lua_getglobal(L, "core"); if (lua_isnil(L, -1)) { - errorstream << "Unable to find core within async environment!"; - abort(); + FATAL_ERROR("Unable to find core within async environment!"); } // Main loop @@ -268,8 +265,7 @@ void* AsyncWorkerThread::run() lua_getfield(L, -1, "job_processor"); if (lua_isnil(L, -1)) { - errorstream << "Unable to get async job processor!" << std::endl; - abort(); + FATAL_ERROR("Unable to get async job processor!"); } luaL_checktype(L, -1, LUA_TFUNCTION); -- cgit v1.2.3