From: Enrico Zini Date: Sat, 27 Mar 2010 18:19:44 +0000 (+0000) Subject: Two less warnings X-Git-Url: https://git.toastfreeware.priv.at/gregoa/zavai.git/commitdiff_plain/889dbfb9fdaab171a21056be7e7b6f77f16e2de2?hp=a02834cf163f36b39331d73359107bdd44bb5aad Two less warnings --- diff --git a/src/zavai.vala b/src/zavai.vala index ae8c3aa..931edc0 100644 --- a/src/zavai.vala +++ b/src/zavai.vala @@ -44,7 +44,11 @@ static Posix.pid_t is_running() static void make_pidfile() { string pidfile = zavai.config.homedir + "/" + pidfilename + ".pid"; - FileUtils.set_contents(pidfile, "%d".printf(Posix.getpid())); + try { + FileUtils.set_contents(pidfile, "%d".printf(Posix.getpid())); + } catch (FileError e) { + zavai.log.error("Cannot create pidfile " + pidfile + ": " + e.message); + } } static void on_kill(int sig) @@ -75,7 +79,12 @@ static int main (string[] args) { arg_description = null }, OptionEntry() }; - Gtk.init_with_args(ref args, "", entries, null); + try { + Gtk.init_with_args(ref args, "", entries, null); + } catch (Error e) { + zavai.log.error("Cannot init gtk: " + e.message); + return 1; + } Gst.init (ref args); pidfilename = "zavai";