mirror of
https://github.com/minetest/minetest.git
synced 2024-12-25 07:32:24 +01:00
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()
This commit is contained in:
parent
814e55597d
commit
7685969274
@ -481,9 +481,17 @@ void Server::step(float dtime)
|
|||||||
}
|
}
|
||||||
// Throw if fatal error occurred in thread
|
// Throw if fatal error occurred in thread
|
||||||
std::string async_err = m_async_fatal_error.get();
|
std::string async_err = m_async_fatal_error.get();
|
||||||
if(async_err != ""){
|
if(async_err != "") {
|
||||||
|
if (m_simple_singleplayer_mode) {
|
||||||
throw ServerError(async_err);
|
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());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Server::AsyncRunStep(bool initial_step)
|
void Server::AsyncRunStep(bool initial_step)
|
||||||
|
Loading…
Reference in New Issue
Block a user