mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
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()
This commit is contained in:
parent
16b961b2eb
commit
5f8e48c63b
1 changed files with 6 additions and 3 deletions
|
@ -479,10 +479,13 @@ void Server::step(float dtime)
|
||||||
JMutexAutoLock lock(m_step_dtime_mutex);
|
JMutexAutoLock lock(m_step_dtime_mutex);
|
||||||
m_step_dtime += dtime;
|
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();
|
std::string async_err = m_async_fatal_error.get();
|
||||||
if(async_err != ""){
|
if(async_err != "") {
|
||||||
throw ServerError(async_err);
|
errorstream << "UNRECOVERABLE error occurred. Stopping server. "
|
||||||
|
<< "Please fix the following error:" << std::endl
|
||||||
|
<< async_err << std::endl;
|
||||||
|
assert(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue