Changeset: f0a704e33fe4 for monetdb-java
URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=f0a704e33fe4
Modified Files:
        src/main/java/nl/cwi/monetdb/jdbc/MonetStatement.java
Branch: default
Log Message:

Improvement: throw SQLFeatureNotSupportedException instead of SQLException
for method cancel(), as we do not support this feature in the driver yet.


diffs (27 lines):

diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetStatement.java 
b/src/main/java/nl/cwi/monetdb/jdbc/MonetStatement.java
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetStatement.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetStatement.java
@@ -14,6 +14,7 @@ import java.sql.Connection;
 import java.sql.Statement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
 import java.sql.SQLWarning;
 import java.util.ArrayList;
 import java.util.List;
@@ -292,12 +293,12 @@ public class MonetStatement
         * aborting an SQL statement.  This method can be used by one thread to
         * cancel a statement that is being executed by another thread.
         *
-        * @throws SQLException if a database access error occurs or the cancel
-        *                      operation is not supported
+        * @throws SQLException - if a database access error occurs or the 
cancel operation is not supported
+        * @throws SQLFeatureNotSupportedException - if the JDBC driver does 
not support this method
         */
        @Override
        public void cancel() throws SQLException {
-               throw new SQLException("Query cancelling is currently not 
supported by the DBMS.", "0A000");
+               throw new SQLFeatureNotSupportedException("Query cancelling is 
currently not supported by the driver.", "0A000");
        }
 
        /**
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to