aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-03-16 20:25:35 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-03-16 20:25:35 +0100
commit5f8e48c63baf12930430d5d8fc07495021599e61 (patch)
tree98ca92857725bac2f2357df0abe95fcd8a6ed9ab
parent16b961b2eb68f2e9a37e218f3fb4f2e451a3a993 (diff)
downloadminetest-5f8e48c63baf12930430d5d8fc07495021599e61.tar.gz
minetest-5f8e48c63baf12930430d5d8fc07495021599e61.tar.bz2
minetest-5f8e48c63baf12930430d5d8fc07495021599e61.zip
Server::step throw is never catched. Replace it with an errorstream + assert
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()
-rw-r--r--src/server.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 35405851f..4e955e40a 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -479,10 +479,13 @@ void Server::step(float dtime)
JMutexAutoLock lock(m_step_dtime_mutex);
m_step_dtime += dtime;
}
- // Throw if fatal error occurred in thread
+ // Assert 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 != "") {
+ errorstream << "UNRECOVERABLE error occurred. Stopping server. "
+ << "Please fix the following error:" << std::endl
+ << async_err << std::endl;
+ assert(false);
}
}