Skip to content

Commit

Permalink
Revert "Server::step throw is never catched. Replace it with an error…
Browse files Browse the repository at this point in the history
…stream + assert"

This reverts commit 5f8e48c.
  • Loading branch information
kwolekr committed Mar 17, 2015
1 parent ceac41e commit 699d42e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/server.cpp
Expand Up @@ -479,13 +479,10 @@ void Server::step(float dtime)
JMutexAutoLock lock(m_step_dtime_mutex);
m_step_dtime += dtime;
}
// Assert if fatal error occurred in thread
// Throw if fatal error occurred in thread
std::string async_err = m_async_fatal_error.get();
if(async_err != "") {
errorstream << "UNRECOVERABLE error occurred. Stopping server. "
<< "Please fix the following error:" << std::endl
<< async_err << std::endl;
assert(false);
if(async_err != ""){
throw ServerError(async_err);
}
}

Expand Down

1 comment on commit 699d42e

@nerzhul
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay for the client side problem. But you didn't fix the server side problem. The server crashes because we throw in the nether.

Please sign in to comment.