mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
content-pack id validation + refactor
This commit is contained in:
parent
ba4338c4fa
commit
b7fbb8621a
10 changed files with 111 additions and 53 deletions
|
|
@ -302,6 +302,13 @@ void create_new_world_panel(Engine* engine, PagesControl* menu) {
|
|||
try {
|
||||
engine->loadAllPacks();
|
||||
engine->loadContent();
|
||||
} catch (const contentpack_error& error) {
|
||||
guiutil::alert(engine->getGUI(),
|
||||
langs::get(L"Content Error", L"menu")+
|
||||
L":\n"+util::str2wstr_utf8(std::string(error.what())+
|
||||
"\npack '"+error.getPackId()+"' from "+
|
||||
error.getFolder().u8string()));
|
||||
return;
|
||||
} catch (const std::runtime_error& error) {
|
||||
guiutil::alert(engine->getGUI(),
|
||||
langs::get(L"Content Error", L"menu")+
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue