Class SelectAIException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.oracle.database.selectai.model.SelectAIException
- All Implemented Interfaces:
Serializable
Checked exception used by the SDK for database, JDBC, and Select AI
operation failures.
When the failure originates from SQLException, the SDK
preserves the original exception as the cause and copies the JDBC error code
and SQLState when available.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSelectAIException(String message) Creates an exception with only a message.SelectAIException(String message, Throwable cause) Creates an exception with a message and root cause.SelectAIException(String message, Throwable cause, Integer errorCode, String sqlState) Creates an exception with database error metadata. -
Method Summary
Modifier and TypeMethodDescriptionReturns the JDBC error code when the failure came from JDBC.Returns the SQLState when the failure came from JDBC.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SelectAIException
Creates an exception with only a message.- Parameters:
message- error message
-
SelectAIException
Creates an exception with a message and root cause.- Parameters:
message- error messagecause- root cause
-
SelectAIException
Creates an exception with database error metadata.- Parameters:
message- error messagecause- root causeerrorCode- JDBC error codesqlState- SQLState value
-
-
Method Details
-
getErrorCode
Returns the JDBC error code when the failure came from JDBC.- Returns:
- JDBC error code, or
nullwhen unavailable
-
getSqlState
Returns the SQLState when the failure came from JDBC.- Returns:
- SQLState string, or
nullwhen unavailable
-