1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-16 01:57:09 +00:00

Some errormessages

This commit is contained in:
Nikolas Garofil 2010-11-18 00:36:36 +01:00
parent aff8c66e7d
commit e19f1c76a9

View File

@ -2634,12 +2634,16 @@ void load_config_file()
lua::stack_sentry s(l); lua::stack_sentry s(l);
l.checkstack(2); l.checkstack(2);
try {
#ifdef BUILD_BUILTIN_CONFIG #ifdef BUILD_BUILTIN_CONFIG
if(current_config == builtin_config_magic) if(current_config == builtin_config_magic)
l.loadstring(defconfig); l.loadstring(defconfig);
else else
#endif #endif
l.loadfile(current_config.c_str()); l.loadfile(current_config.c_str());
}
catch(lua::syntax_error &e) { throw conky::critical_error(_("syntax error in configfile")); }
catch(lua::file_error &e) { throw conky::critical_error(_("no configfile given")); }
l.call(0, 0); l.call(0, 0);
l.getglobal("conky"); l.getglobal("conky");
@ -3080,6 +3084,10 @@ int main(int argc, char **argv)
clean_up(NULL, NULL); clean_up(NULL, NULL);
return EXIT_FAILURE; return EXIT_FAILURE;
} }
catch(std::bad_alloc &e) {
std::cerr << e.what() << std::endl;
return EXIT_FAILURE;
}
disk_cleanup(); disk_cleanup();