aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-03-16 21:17:27 -0400
committerkwolekr <kwolekr@minetest.net>2015-03-16 21:17:27 -0400
commit699d42efc64cb1e317efbdf21dd55fdbef4c108c (patch)
treecde279404e6054f338c38077e775742de63db434
parentceac41ed6e2458e55f7277a9758dbea3cf907d74 (diff)
downloadminetest-699d42efc64cb1e317efbdf21dd55fdbef4c108c.tar.gz
minetest-699d42efc64cb1e317efbdf21dd55fdbef4c108c.tar.bz2
minetest-699d42efc64cb1e317efbdf21dd55fdbef4c108c.zip
Revert "Server::step throw is never catched. Replace it with an errorstream + assert"
This reverts commit 5f8e48c63baf12930430d5d8fc07495021599e61.
-rw-r--r--src/server.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 4e955e40a..35405851f 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -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);
}
}