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