summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2012-08-13 22:03:46 +0200
committerSebastian Reichel <sre@ring0.de>2012-08-13 22:03:46 +0200
commitb2ebdc335f3b08e288ccbbcc27626a8c1f4aff64 (patch)
tree4f5f43908a86c6a860560da589b3a2eb87c46f8c
parent8366c5ab7d4f00e9bb71e4b028c27367aa9fd9e3 (diff)
downloadmicrocopterd-b2ebdc335f3b08e288ccbbcc27626a8c1f4aff64.tar.bz2
fix unhandled error
-rw-r--r--log.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/log.vala b/log.vala
index 71b5875..b0ddf0a 100644
--- a/log.vala
+++ b/log.vala
@@ -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;
}