[glom] DbUtils: Improve debug output.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] DbUtils: Improve debug output.
- Date: Fri, 10 Sep 2010 13:52:40 +0000 (UTC)
commit 8f7cb9711755a2d20e69e0fdbda68ef5dcc52dad
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Sep 10 15:42:55 2010 +0200
DbUtils: Improve debug output.
* glom/libglom/db_utils.cc: query_execute_select(): Try to get more
information about a connection timeout error when it happens.
ChangeLog | 7 +++++++
glom/libglom/db_utils.cc | 9 ++++++++-
2 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e27379e..51982cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2010-09-10 Murray Cumming <murrayc murrayc com>
+ DbUtils: Improve debug output.
+
+ * glom/libglom/db_utils.cc: query_execute_select(): Try to get more
+ information about a connection timeout error when it happens.
+
+2010-09-10 Murray Cumming <murrayc murrayc com>
+
Tests: derived instantiation: Test an extra dialog.
* glom/mode_design/layout/dialog_layout_calendar_related.h: Correct the
diff --git a/glom/libglom/db_utils.cc b/glom/libglom/db_utils.cc
index 5dd9a30..ac2d6ff 100644
--- a/glom/libglom/db_utils.cc
+++ b/glom/libglom/db_utils.cc
@@ -1472,7 +1472,14 @@ Glib::RefPtr<Gnome::Gda::DataModel> query_execute_select(const Glib::RefPtr<cons
}
catch(const Gnome::Gda::ServerProviderError& ex)
{
- std::cerr << G_STRFUNC << ": code=" << ex.code() << "message=" << ex.what() << std::endl;
+ if(ex.code() == Gnome::Gda::ServerProviderError::SERVER_PROVIDER_STATEMENT_EXEC_ERROR)
+ {
+ std::cerr << G_STRFUNC << ": code=SERVER_PROVIDER_STATEMENT_EXEC_ERROR, message=" << ex.what() << std::endl;
+ }
+ else
+ {
+ std::cerr << G_STRFUNC << ": code=" << ex.code() << "message=" << ex.what() << std::endl;
+ }
}
catch(const Gnome::Gda::SqlError& ex) //TODO: Make sure that statement_execute_select_builder() is documented as throwing this.
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]