[glom] Fixed small build problem with disabled exceptions



commit 7f930024389c1a06e24a6d403bc4ddbe902905b1
Author: Johannes Schmid <jhs gnome org>
Date:   Tue Sep 1 10:56:29 2009 +0200

    Fixed small build problem with disabled exceptions

 ChangeLog       |    4 ++++
 glom/base_db.cc |    8 ++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 66baef8..554256b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-09-01  Johannes Schmid  <jschmid openismus com>
 
+	* glom/base_db.cc: Fixed small build problem with disabled exceptions
+
+2009-09-01  Johannes Schmid  <jschmid openismus com>
+
 	* glom/libglom/connectionpool_backends/postgres.cc:
 	Also use SQL_IDENTIFIERS_CASE_SENSITIVE on maemo
 	* glom/base_db.cc:
diff --git a/glom/base_db.cc b/glom/base_db.cc
index 0a867f2..0eafd31 100644
--- a/glom/base_db.cc
+++ b/glom/base_db.cc
@@ -635,8 +635,13 @@ Base_DB::type_vec_fields Base_DB::get_fields_for_table_from_database(const Glib:
     g_free (quoted_table_name_c);
     quoted_table_name_c = 0;
 
+#ifdef GLIBMM_EXCEPTIONS_ENABLED    
     holder_table_name->set_value(quoted_table_name);
-
+#else
+    std::auto_ptr<Glib::Error> error;
+    holder_table_name->set_value(quoted_table_name, error);
+#endif
+    
     std::list< Glib::RefPtr<Gnome::Gda::Holder> > holder_list;
     holder_list.push_back(holder_table_name);
 
@@ -655,7 +660,6 @@ Base_DB::type_vec_fields Base_DB::get_fields_for_table_from_database(const Glib:
       std::cerr << "Base_DB::get_fields_for_table_from_database(): Error: " << ex.what() << std::endl;
     }
 #else
-    std::auto_ptr<Glib::Error> error;
     data_model_fields = connection->get_meta_store_data(Gnome::Gda::CONNECTION_META_FIELDS, holder_list, error);
 
     // Ignore error, data_model_fields presence is checked below



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