Class SelectAIException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.oracle.database.selectai.model.SelectAIException
All Implemented Interfaces:
Serializable

public class SelectAIException extends Exception
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 Details

    • SelectAIException

      public SelectAIException(String message)
      Creates an exception with only a message.
      Parameters:
      message - error message
    • SelectAIException

      public SelectAIException(String message, Throwable cause)
      Creates an exception with a message and root cause.
      Parameters:
      message - error message
      cause - root cause
    • SelectAIException

      public SelectAIException(String message, Throwable cause, Integer errorCode, String sqlState)
      Creates an exception with database error metadata.
      Parameters:
      message - error message
      cause - root cause
      errorCode - JDBC error code
      sqlState - SQLState value
  • Method Details

    • getErrorCode

      Returns the JDBC error code when the failure came from JDBC.
      Returns:
      JDBC error code, or null when unavailable
    • getSqlState

      public String getSqlState()
      Returns the SQLState when the failure came from JDBC.
      Returns:
      SQLState string, or null when unavailable