Mercurial > hg > monetdb-java
changeset 179:f0a704e33fe4
Improvement: throw SQLFeatureNotSupportedException instead of SQLException
for method cancel(), as we do not support this feature in the driver yet.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 05 Oct 2017 15:03:44 +0200 (2017-10-05) |
parents | dd12348c41cf |
children | fdf4c888d5b7 |
files | src/main/java/nl/cwi/monetdb/jdbc/MonetStatement.java |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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"); } /**