mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Add ignore_world_load_errors configuration option and provide better error messages
This commit is contained in:
parent
1cd2076d42
commit
f48882213e
5 changed files with 62 additions and 12 deletions
|
@ -164,6 +164,8 @@ void * EmergeThread::Thread()
|
|||
BEGIN_DEBUG_EXCEPTION_HANDLER
|
||||
|
||||
bool enable_mapgen_debug_info = g_settings->getBool("enable_mapgen_debug_info");
|
||||
|
||||
v3s16 last_tried_pos(-32768,-32768,-32768); // For error output
|
||||
|
||||
/*
|
||||
Get block info from queue, emerge them and send them
|
||||
|
@ -181,6 +183,8 @@ void * EmergeThread::Thread()
|
|||
|
||||
v3s16 &p = q->pos;
|
||||
v2s16 p2d(p.X,p.Z);
|
||||
|
||||
last_tried_pos = p;
|
||||
|
||||
/*
|
||||
Do not generate over-limit
|
||||
|
@ -377,8 +381,23 @@ void * EmergeThread::Thread()
|
|||
}
|
||||
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());
|
||||
std::ostringstream err;
|
||||
err<<"World data version mismatch in MapBlock "<<PP(last_tried_pos)<<std::endl;
|
||||
err<<"----"<<std::endl;
|
||||
err<<"\""<<e.what()<<"\""<<std::endl;
|
||||
err<<"See debug.txt."<<std::endl;
|
||||
err<<"World probably saved by a newer version of Minetest."<<std::endl;
|
||||
m_server->setAsyncFatalError(err.str());
|
||||
}
|
||||
catch(SerializationError &e)
|
||||
{
|
||||
std::ostringstream err;
|
||||
err<<"Invalid data in MapBlock "<<PP(last_tried_pos)<<std::endl;
|
||||
err<<"----"<<std::endl;
|
||||
err<<"\""<<e.what()<<"\""<<std::endl;
|
||||
err<<"See debug.txt."<<std::endl;
|
||||
err<<"You can ignore this using [ignore_world_load_errors = true]."<<std::endl;
|
||||
m_server->setAsyncFatalError(err.str());
|
||||
}
|
||||
|
||||
END_DEBUG_EXCEPTION_HANDLER(errorstream)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue