aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fluxbox.cc28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 15b3f0f..bbb9cf3 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -1153,21 +1153,23 @@ void Fluxbox::load_rc() {
1153 1153
1154 string dbfile(getRcFilename()); 1154 string dbfile(getRcFilename());
1155 1155
1156 m_l->loadfile(dbfile.c_str()); 1156 try {
1157 m_l->call(0, 0); 1157 m_l->loadfile(dbfile.c_str());
1158 1158 m_l->call(0, 0);
1159 /* XXX 1159 }
1160 if (!dbfile.empty()) { 1160 catch(lua::exception &e) {
1161 if (!m_resourcemanager.load(dbfile.c_str())) { 1161 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<dbfile<<endl;
1162 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<dbfile<<endl; 1162 cerr<<"Fluxbox: "<<e.what()<<endl;
1163 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFileTrying, "Retrying with", "Retrying rc file loading with (the following file)")<<": "<<DEFAULT_INITFILE<<endl; 1163 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFileTrying, "Retrying with", "Retrying rc file loading with (the following file)")<<": "<<DEFAULT_INITFILE<<endl;
1164 if (!m_resourcemanager.load(DEFAULT_INITFILE)) 1164 try {
1165 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl; 1165 m_l->loadfile(DEFAULT_INITFILE);
1166 m_l->call(0, 0);
1166 } 1167 }
1167 } else { 1168 catch(lua::exception &e) {
1168 if (!m_resourcemanager.load(DEFAULT_INITFILE))
1169 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl; 1169 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
1170 } */ 1170 cerr<<"Fluxbox: "<<e.what()<<endl;
1171 }
1172 }
1171 1173
1172 if (m_rc_menufile->empty()) 1174 if (m_rc_menufile->empty())
1173 m_rc_menufile.setDefaultValue(); 1175 m_rc_menufile.setDefaultValue();