summaryrefslogtreecommitdiff
path: root/src/guiConfigureWorld.cpp
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2013-05-03 23:58:22 +0200
committerKahrl <kahrl@gmx.net>2013-05-03 23:58:22 +0200
commit969d2b3eb1f30e257823d9220697e47735be68e3 (patch)
treef94b2176f4a145eef3c8bea452ea788ef2810ec0 /src/guiConfigureWorld.cpp
parenta031a1548783f1dd4d6b357fef391647dfb35ce3 (diff)
downloadminetest-969d2b3eb1f30e257823d9220697e47735be68e3.tar.gz
minetest-969d2b3eb1f30e257823d9220697e47735be68e3.tar.bz2
minetest-969d2b3eb1f30e257823d9220697e47735be68e3.zip
Optional dependencies and properly handle mod name conflicts again
Diffstat (limited to 'src/guiConfigureWorld.cpp')
-rw-r--r--src/guiConfigureWorld.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/guiConfigureWorld.cpp b/src/guiConfigureWorld.cpp
index b2debfbd2..f94ed7d17 100644
--- a/src/guiConfigureWorld.cpp
+++ b/src/guiConfigureWorld.cpp
@@ -407,14 +407,26 @@ bool GUIConfigureWorld::OnEvent(const SEvent& event)
delete[] text;
menu->drop();
- ModConfiguration modconf(m_wspec.path);
- if(!modconf.isConsistent())
+ try
{
- wchar_t* text = wgettext("Warning: Configuration not consistent. ");
+ ModConfiguration modconf(m_wspec.path);
+ if(!modconf.isConsistent())
+ {
+ wchar_t* text = wgettext("Warning: Configuration not consistent. ");
+ GUIMessageMenu *menu =
+ new GUIMessageMenu(Environment, Parent, -1, m_menumgr,
+ text );
+ delete[] text;
+ menu->drop();
+ }
+ }
+ catch(ModError &err)
+ {
+ errorstream<<err.what()<<std::endl;
+ std::wstring text = narrow_to_wide(err.what()) + wgettext("\nCheck debug.txt for details.");
GUIMessageMenu *menu =
new GUIMessageMenu(Environment, Parent, -1, m_menumgr,
- text );
- delete[] text;
+ text );
menu->drop();
}