Date: Thursday, December 8, 2005 @ 15:18:37
  Author: gilles
    Path: /cvsroot/carob/carob

Modified: include/Connection.hpp (1.30 -> 1.31)
          include/DriverResultSet.hpp (1.18 -> 1.19) include/Statement.hpp
          (1.12 -> 1.13) src/Connection.cpp (1.35 -> 1.36)
          src/DriverResultSet.cpp (1.15 -> 1.16) src/Statement.cpp (1.14
          -> 1.15)

Corrected excptions thrown by the getMoreResults chain (inc. ResultSet close 
and next): Controller can also send Backend and Controller exceptions


-----------------------------+
 include/Connection.hpp      |    3 ++-
 include/DriverResultSet.hpp |    7 ++++---
 include/Statement.hpp       |    8 ++++++--
 src/Connection.cpp          |    2 +-
 src/DriverResultSet.cpp     |    7 ++++---
 src/Statement.cpp           |    7 ++++---
 6 files changed, 21 insertions(+), 13 deletions(-)


Index: carob/include/Connection.hpp
diff -u carob/include/Connection.hpp:1.30 carob/include/Connection.hpp:1.31
--- carob/include/Connection.hpp:1.30   Fri Dec  2 15:53:07 2005
+++ carob/include/Connection.hpp        Thu Dec  8 15:18:37 2005
@@ -248,7 +248,8 @@
    */
   void              tryFetchNext(const std::wstring& cursorName, int fetchSize)
                         throw (ControllerException, SocketIOException,
-                        ProtocolException, UnexpectedException);
+                        ProtocolException, BackendException,
+                        UnexpectedException);
 
 protected:
   /** 
Index: carob/include/DriverResultSet.hpp
diff -u carob/include/DriverResultSet.hpp:1.18 
carob/include/DriverResultSet.hpp:1.19
--- carob/include/DriverResultSet.hpp:1.18      Tue Dec  6 17:38:34 2005
+++ carob/include/DriverResultSet.hpp   Thu Dec  8 15:18:37 2005
@@ -131,7 +131,7 @@
    */
    bool                       next() throw (SocketIOException,
                                   ControllerException, ProtocolException,
-                                  UnexpectedException);
+                                  BackendException, UnexpectedException);
 
   /**
    * Get the value of a column in the current row as a wstring
@@ -157,8 +157,9 @@
    * 
    * @exception DriverSQLException if a database access error occurs
    */
-  void                        close() throw (SQLException, 
UnexpectedException);
-
+  void                        close() throw (SocketIOException,
+                                  BackendException, ControllerException,
+                                  ProtocolException, UnexpectedException);
   /**
    * Gets the number of column in this resultSet
    * @return number of columns value
Index: carob/include/Statement.hpp
diff -u carob/include/Statement.hpp:1.12 carob/include/Statement.hpp:1.13
--- carob/include/Statement.hpp:1.12    Tue Dec  6 17:42:07 2005
+++ carob/include/Statement.hpp Thu Dec  8 15:18:37 2005
@@ -119,7 +119,9 @@
    * @return true for a ResultSet, false for an updateCount or no more results
    * @exception DriverException if an error occurs
    */
-  bool                    getMoreResults() throw (DriverException, 
SQLException,
+  bool                    getMoreResults() throw (DriverException,
+                              SocketIOException, BackendException,
+                              ControllerException, ProtocolException,
                               UnexpectedException);
   /**
    * Moves to this <code>Statement</code> object's next result, deals with any
@@ -143,7 +145,9 @@
    * @see #execute(std::wstring)
    */
   bool                    getMoreResults(int current) throw (DriverException,
-                              SQLException, UnexpectedException);
+                              SocketIOException, BackendException,
+                              ControllerException, ProtocolException,
+                              UnexpectedException);
   // GETTERS AND SETTERS
   /**
    * Returns the current result as an update count, if the result is a
Index: carob/src/Connection.cpp
diff -u carob/src/Connection.cpp:1.35 carob/src/Connection.cpp:1.36
--- carob/src/Connection.cpp:1.35       Tue Dec  6 17:44:13 2005
+++ carob/src/Connection.cpp    Thu Dec  8 15:18:37 2005
@@ -633,7 +633,7 @@
 }
 void Connection::tryFetchNext(const wstring& cursorName, int fetchSize)
     throw (SocketIOException, ControllerException, ProtocolException,
-    UnexpectedException)
+    BackendException, UnexpectedException)
 {   
   wstring fctName(L"Connection::tryFetchNext");
 
Index: carob/src/DriverResultSet.cpp
diff -u carob/src/DriverResultSet.cpp:1.15 carob/src/DriverResultSet.cpp:1.16
--- carob/src/DriverResultSet.cpp:1.15  Wed Dec  7 11:34:45 2005
+++ carob/src/DriverResultSet.cpp       Thu Dec  8 15:18:37 2005
@@ -159,7 +159,7 @@
 }
 
 bool DriverResultSet::next() throw (SocketIOException, ControllerException, 
-    ProtocolException, UnexpectedException)
+    ProtocolException, BackendException, UnexpectedException)
 {
   checkIfClosed();
 
@@ -173,7 +173,7 @@
       // TODO: what happens if user closed this connection? What says JDBC?
       connectionPtr->tryFetchNext(cursorName, fetchSize);
       // no SQLException from controller, so let's receive our new rows
-        receiveRows();
+      receiveRows();
       currentRow = 0;
       if (dataIsNull)
       {
@@ -266,7 +266,8 @@
   return (data[currentRow][columnIndex - 1].as_int);
 }
 
-void DriverResultSet::close() throw (SQLException, UnexpectedException)
+void DriverResultSet::close() throw (SocketIOException, BackendException,
+    ControllerException, ProtocolException, UnexpectedException)
 {
   if (hasMoreData)
     connectionPtr->closeRemoteResultSet(cursorName);
Index: carob/src/Statement.cpp
diff -u carob/src/Statement.cpp:1.14 carob/src/Statement.cpp:1.15
--- carob/src/Statement.cpp:1.14        Tue Dec  6 17:42:07 2005
+++ carob/src/Statement.cpp     Thu Dec  8 15:18:37 2005
@@ -126,8 +126,8 @@
   return updateCount;
 }
 
-bool Statement::getMoreResults() throw (DriverException, SQLException,
-    UnexpectedException)
+bool Statement::getMoreResults() throw (DriverException, SocketIOException,
+BackendException, ControllerException, ProtocolException, UnexpectedException)
 {
   return getMoreResults(CLOSE_CURRENT_RESULT);
 }
@@ -153,7 +153,8 @@
  * @exception SQLException if a database access error occurs
  * @see #execute(String)
  */
-bool Statement::getMoreResults(int current) throw (DriverException, 
SQLException,
+bool Statement::getMoreResults(int current) throw (DriverException,
+    SocketIOException, BackendException, ControllerException, 
ProtocolException,
     UnexpectedException)
 {
   if (current != KEEP_CURRENT_RESULT)

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to