[glom] Glade utils: Catch generic exceptions.



commit 84e93c922bdc903157cd9469c8caa57947c0c7d2
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Sep 29 09:27:15 2011 +0200

    Glade utils: Catch generic exceptions.
    
    * glom/glade_utils.h: Though this only happens when gtkmm has not been
    initialized.

 ChangeLog          |    7 +++++++
 glom/glade_utils.h |   10 +++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7c09482..2b9ea39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-09-29  Murray Cumming  <murrayc murrayc com>
+
+	Glade utils: Catch generic exceptions.
+
+	* glom/glade_utils.h: Though this only happens when gtkmm has not been 
+	initialized.
+
 2011-09-28  Murray Cumming  <murrayc murrayc com>
 
 	Related Records: Fix bug with a blank row when there is only one row. 
diff --git a/glom/glade_utils.h b/glom/glade_utils.h
index e6d07a8..24ef83e 100644
--- a/glom/glade_utils.h
+++ b/glom/glade_utils.h
@@ -75,15 +75,19 @@ void helper_get_glade_widget_derived_with_warning(const std::string& filename, c
   }
   catch(const Gtk::BuilderError& ex)
   {
-    std::cerr << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
   }
   catch(const Glib::MarkupError& ex)
   {
-    std::cerr << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
   }
   catch(const Glib::FileError& ex)
   {
-    std::cerr << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
+  }
+  catch(const Glib::Error& ex)
+  {
+    std::cerr << G_STRFUNC << ": Exception of unexpected type: " << ex.what() << std::endl;
   }
 
   if(refXml)



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