aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fluxbox.cc28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 177e985..dd7b15c 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -1161,21 +1161,23 @@ void Fluxbox::load_rc() {
1161 1161
1162 string dbfile(getRcFilename()); 1162 string dbfile(getRcFilename());
1163 1163
1164 m_l->loadfile(dbfile.c_str()); 1164 try {
1165 m_l->call(0, 0); 1165 m_l->loadfile(dbfile.c_str());
1166 1166 m_l->call(0, 0);
1167 /* XXX 1167 }
1168 if (!dbfile.empty()) { 1168 catch(lua::exception &e) {
1169 if (!m_resourcemanager.load(dbfile.c_str())) { 1169 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<dbfile<<endl;
1170 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<dbfile<<endl; 1170 cerr<<"Fluxbox: "<<e.what()<<endl;
1171 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFileTrying, "Retrying with", "Retrying rc file loading with (the following file)")<<": "<<DEFAULT_INITFILE<<endl; 1171 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFileTrying, "Retrying with", "Retrying rc file loading with (the following file)")<<": "<<DEFAULT_INITFILE<<endl;
1172 if (!m_resourcemanager.load(DEFAULT_INITFILE)) 1172 try {
1173 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl; 1173 m_l->loadfile(DEFAULT_INITFILE);
1174 m_l->call(0, 0);
1174 } 1175 }
1175 } else { 1176 catch(lua::exception &e) {
1176 if (!m_resourcemanager.load(DEFAULT_INITFILE))
1177 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl; 1177 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
1178 } */ 1178 cerr<<"Fluxbox: "<<e.what()<<endl;
1179 }
1180 }
1179 1181
1180 if (m_rc_menufile->empty()) 1182 if (m_rc_menufile->empty())
1181 m_rc_menufile.setDefaultValue(); 1183 m_rc_menufile.setDefaultValue();