Package com.clickhouse.jdbc.internal
Class ExceptionUtils
java.lang.Object
com.clickhouse.jdbc.internal.ExceptionUtils
Helper class for building
SQLException.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ThrowablegetRootCause(Throwable throwable) static SQLExceptiontoSqlState(Exception cause) Convert aExceptionto aSQLException.static SQLExceptiontoSqlState(String message, String debugMessage, Exception cause) Convert aExceptionto aSQLException.
-
Field Details
-
SQL_STATE_CLIENT_ERROR
- See Also:
-
SQL_STATE_OPERATION_CANCELLED
- See Also:
-
SQL_STATE_CONNECTION_EXCEPTION
- See Also:
-
SQL_STATE_SQL_ERROR
- See Also:
-
SQL_STATE_NO_DATA
- See Also:
-
SQL_STATE_INVALID_SCHEMA
- See Also:
-
SQL_STATE_INVALID_TX_STATE
- See Also:
-
SQL_STATE_DATA_EXCEPTION
- See Also:
-
SQL_STATE_FEATURE_NOT_SUPPORTED
- See Also:
-
-
Method Details
-
toSqlState
Convert aExceptionto aSQLException.- Parameters:
cause-Exceptionto convert- Returns:
- Converted
SQLException
-
toSqlState
Convert aExceptionto aSQLException.- Parameters:
message- Custom message to usecause-Exceptionto convert- Returns:
- Converted
SQLException
-
getRootCause
-