This commit is contained in:
zyyang 2021-02-06 15:28:58 +08:00
parent 56e5beaf53
commit 178d2d9821
1 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package com.taosdata.jdbc;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.util.HashMap;
import java.util.Map;
@ -48,6 +49,9 @@ public class TSDBError {
message = TSDBErrorMap.get(TSDBErrorNumbers.ERROR_UNKNOWN);
}
if (errorNumber == TSDBErrorNumbers.ERROR_UNSUPPORTED_METHOD)
return new SQLFeatureNotSupportedException(message);
if (errorNumber < TSDBErrorNumbers.ERROR_UNKNOWN)
// JDBC exception's error number is less than 0x2350
return new SQLException("ERROR (" + Integer.toHexString(errorNumber) + "): " + message);