1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-11-17 14:55:13 -05:00

Catch VersionMismatchException while loading world data

This commit is contained in:
Perttu Ahola 2012-06-03 20:42:49 +03:00
parent e2ea711136
commit 67059e1932

View File

@ -172,7 +172,7 @@ void * EmergeThread::Thread()
After queue is empty, exit. After queue is empty, exit.
*/ */
while(getRun()) while(getRun())
{ try{
QueuedBlockEmerge *qptr = m_server->m_emerge_queue.pop(); QueuedBlockEmerge *qptr = m_server->m_emerge_queue.pop();
if(qptr == NULL) if(qptr == NULL)
break; break;
@ -374,7 +374,11 @@ void * EmergeThread::Thread()
client->SetBlocksNotSent(modified_blocks); 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) END_DEBUG_EXCEPTION_HANDLER(errorstream)