From 768596927458d4d1d4ae7914526311471d242555 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Tue, 17 Mar 2015 09:13:12 +0100 Subject: Server::step throw is never catched in minetestserver Replace it with an errorstream + assert for server This throw can be trigger by LuaError exception or ConnectionBindFailed exception in the following functions: * EmergeThread::Thread() * ScriptApiEnv::environment_Step() * ScriptApiEnv::player_event() * ServerThread::Thread() --- src/server.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/server.cpp b/src/server.cpp index 18968cdf9..235e802bb 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -481,8 +481,16 @@ void Server::step(float dtime) } // Throw if fatal error occurred in thread std::string async_err = m_async_fatal_error.get(); - if(async_err != ""){ - throw ServerError(async_err); + if(async_err != "") { + if (m_simple_singleplayer_mode) { + throw ServerError(async_err); + } + else { + errorstream << "UNRECOVERABLE error occurred. Stopping server. " + << "Please fix the following error:" << std::endl + << async_err << std::endl; + FATAL_ERROR(async_err.c_str()); + } } } -- cgit v1.2.3