Revert "Server::step throw is never catched. Replace it with an errorstream + assert"
authorkwolekr <kwolekr@minetest.net>
Tue, 17 Mar 2015 01:17:27 +0000 (21:17 -0400)
committerkwolekr <kwolekr@minetest.net>
Tue, 17 Mar 2015 01:17:27 +0000 (21:17 -0400)
This reverts commit 5f8e48c63baf12930430d5d8fc07495021599e61.

src/server.cpp

index 4e955e40a410b8044959cdd73ef0021aee37d069..35405851fa85260240b44fe41f0de61c4a98de7f 100644 (file)
@@ -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);
        }
 }