aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-06-03 20:42:49 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-06-03 20:42:49 +0300
commit67059e193229137e88f5e10e08c9c7e18c408281 (patch)
tree0060df2c805fc43b906f66b00a400efe8f911d48 /src
parente2ea71113672de8189d8e0a5b347c8cf08ea2bf6 (diff)
downloadminetest-67059e193229137e88f5e10e08c9c7e18c408281.tar.gz
minetest-67059e193229137e88f5e10e08c9c7e18c408281.tar.bz2
minetest-67059e193229137e88f5e10e08c9c7e18c408281.zip
Catch VersionMismatchException while loading world data
Diffstat (limited to 'src')
-rw-r--r--src/server.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 771eb3652..e4ac8bf48 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)