[gnome-contacts] Handle exception in Gtk.init_with_args



commit 333799fada0fcf084e53e18d21cb3a21d1074c1a
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Aug 26 08:37:37 2011 +0200

    Handle exception in Gtk.init_with_args

 src/main.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/main.vala b/src/main.vala
index 0b99ed6..ee73433 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -38,7 +38,12 @@ main (string[] args) {
   Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8");
   Intl.textdomain (Config.GETTEXT_PACKAGE);
 
-  Gtk.init_with_args (ref args, "â contact management", options, Config.GETTEXT_PACKAGE);
+  try {
+    Gtk.init_with_args (ref args, "â contact management", options, Config.GETTEXT_PACKAGE);
+  } catch (Error e) {
+    printerr ("Unable to initialize: %s\n", e.message);
+    return 1;
+  }
 
   try {
     var provider = new CssProvider ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]