mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
improve parsing error alert
This commit is contained in:
parent
fe1ac69b57
commit
18d473b673
4 changed files with 42 additions and 28 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include "EngineController.hpp"
|
||||
|
||||
#include "../coders/commons.hpp"
|
||||
#include "../content/ContentLUT.hpp"
|
||||
#include "../debug/Logger.hpp"
|
||||
#include "../engine.hpp"
|
||||
|
|
@ -103,6 +104,10 @@ static bool loadWorldContent(Engine* engine, const fs::path& folder) {
|
|||
util::str2wstr_utf8(error.what())
|
||||
);
|
||||
return false;
|
||||
} catch (const parsing_error& error) {
|
||||
engine->setScreen(std::make_shared<MenuScreen>(engine));
|
||||
guiutil::alert(engine->getGUI(), util::str2wstr_utf8(error.errorLog()));
|
||||
return false;
|
||||
} catch (const std::runtime_error& error) {
|
||||
engine->setScreen(std::make_shared<MenuScreen>(engine));
|
||||
guiutil::alert(
|
||||
|
|
@ -204,6 +209,10 @@ void EngineController::createWorld(
|
|||
L":\n"+util::str2wstr_utf8(error.what())
|
||||
);
|
||||
return;
|
||||
} catch (const parsing_error& error) {
|
||||
engine->setScreen(std::make_shared<MenuScreen>(engine));
|
||||
guiutil::alert(engine->getGUI(), util::str2wstr_utf8(error.errorLog()));
|
||||
return;
|
||||
} catch (const std::runtime_error& error) {
|
||||
engine->setScreen(std::make_shared<MenuScreen>(engine));
|
||||
guiutil::alert(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue