[libgdamm] Connection: close() can now throw an exception.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdamm] Connection: close() can now throw an exception.
- Date: Fri, 25 Apr 2014 20:01:41 +0000 (UTC)
commit 01b513ec5b5d4609f838f7f27952c2c36fe1b558
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Apr 25 21:48:02 2014 +0200
Connection: close() can now throw an exception.
Also ignore a private function.
libgda/src/connection.ccg | 6 +++++-
libgda/src/connection.hg | 2 --
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/libgda/src/connection.ccg b/libgda/src/connection.ccg
index 09c1c52..a9e7445 100644
--- a/libgda/src/connection.ccg
+++ b/libgda/src/connection.ccg
@@ -65,7 +65,11 @@ void Connection::close()
{
//gda_connection_close() does an unref, but we don't want that:
reference();
- gda_connection_close(gobj());
+
+ GError* gerror = 0;
+ gda_connection_close(gobj(), &gerror);
+ if(gerror)
+ ::Glib::Error::throw_exception(gerror);
}
Glib::RefPtr<Glib::Object> Connection::statement_execute(const Glib::RefPtr<const Statement>& cmd, const
Glib::RefPtr<const Set>& params, StatementModelUsage model_usage, Glib::RefPtr<const Set>& last_inserted_row)
diff --git a/libgda/src/connection.hg b/libgda/src/connection.hg
index 7b41c53..624a834 100644
--- a/libgda/src/connection.hg
+++ b/libgda/src/connection.hg
@@ -104,8 +104,6 @@ public:
_IGNORE(gda_connection_point_available_event, gda_connection_add_event, gda_connection_add_event_string,
gda_connection_clear_events_list)
- _WRAP_METHOD(void clear_events_list(), gda_connection_clear_events_list)
-
_WRAP_METHOD_DOCS_ONLY(gda_connection_statement_execute)
Glib::RefPtr<Glib::Object> statement_execute(const Glib::RefPtr<const Statement>& stmt, const
Glib::RefPtr<const Set>& params, StatementModelUsage model_usage, Glib::RefPtr<const Set>& last_insert_row);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]