From: Perttu Ahola Date: Sun, 3 Jun 2012 17:42:49 +0000 (+0300) Subject: Catch VersionMismatchException while loading world data X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=67059e193229137e88f5e10e08c9c7e18c408281;p=zefram%2Fminetest%2Fminetest_engine.git Catch VersionMismatchException while loading world data --- diff --git a/src/server.cpp b/src/server.cpp index 771eb365..e4ac8bf4 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -172,7 +172,7 @@ void * EmergeThread::Thread() After queue is empty, exit. */ while(getRun()) - { + try{ QueuedBlockEmerge *qptr = m_server->m_emerge_queue.pop(); if(qptr == NULL) break; @@ -374,7 +374,11 @@ void * EmergeThread::Thread() client->SetBlocksNotSent(modified_blocks); } } - + } + catch(VersionMismatchException &e) + { + m_server->setAsyncFatalError(std::string( + "World data version mismatch (server-side) (world probably saved by a newer version of Minetest): ")+e.what()); } END_DEBUG_EXCEPTION_HANDLER(errorstream)