diff options
author | Sebastian Reichel <sre@ring0.de> | 2012-08-13 22:03:46 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2012-08-13 22:03:46 +0200 |
commit | b2ebdc335f3b08e288ccbbcc27626a8c1f4aff64 (patch) | |
tree | 4f5f43908a86c6a860560da589b3a2eb87c46f8c | |
parent | 8366c5ab7d4f00e9bb71e4b028c27367aa9fd9e3 (diff) | |
download | microcopterd-b2ebdc335f3b08e288ccbbcc27626a8c1f4aff64.tar.bz2 |
fix unhandled error
-rw-r--r-- | log.vala | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -7,7 +7,12 @@ namespace Log { TimeVal time = {0}; time.get_current_time(); - set_file(cfg.get_string("config", "logfile")); + try { + set_file(cfg.get_string("config", "logfile")); + } catch(Error e) { + error("Please specify logfile in config."); + } + GLib.Log.set_default_handler(log_handler); start_timestamp = time.tv_sec; } |