summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-25 18:45:27 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-03-25 18:45:27 +0300
commitf01c988094ee53920602a7a296264528095fc9bd (patch)
tree2488969ce773328f55eb2a2c0df719e6bfa6e8be /src/game.cpp
parent677456d319f7935a308c28d22c57c4af91c3679a (diff)
downloadminetest-f01c988094ee53920602a7a296264528095fc9bd.tar.gz
minetest-f01c988094ee53920602a7a296264528095fc9bd.tar.bz2
minetest-f01c988094ee53920602a7a296264528095fc9bd.zip
Some serialization version stuff
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index d6c9910be..7515af8d9 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -991,6 +991,7 @@ void the_game(
server->start(port);
}
+ try{
do{ // Client scope (breakable do-while(0))
/*
@@ -2911,6 +2912,14 @@ void the_game(
// Client scope (client is destructed before destructing *def and tsrc)
}while(0);
+ } // try-catch
+ catch(SerializationError &e)
+ {
+ error_message = L"A serialization error occurred:\n"
+ + narrow_to_wide(e.what()) + L"\n\nThe server is probably "
+ L" running a different version of Minetest.";
+ errorstream<<wide_to_narrow(error_message)<<std::endl;
+ }
if(!sound_is_dummy)
delete sound;