Class AvaticaRuntimeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.calcite.avatica.remote.AvaticaRuntimeException
All Implemented Interfaces:
Serializable

public class AvaticaRuntimeException extends RuntimeException
A RuntimeException thrown by Avatica with additional contextual information about what happened to cause the Exception.
See Also:
  • Constructor Details

    • AvaticaRuntimeException

      public AvaticaRuntimeException()
      Constructs an AvaticaRuntimeException with no additional information.

      It is strongly preferred that the caller invoke AvaticaRuntimeException(String, int, String, AvaticaSeverity) with proper contextual information.

    • AvaticaRuntimeException

      public AvaticaRuntimeException(String errorMessage, int errorCode, String sqlState, AvaticaSeverity severity)
      Constructs an AvaticaRuntimeException with the given contextual information surrounding the error.
      Parameters:
      errorMessage - A human-readable explanation about what happened
      errorCode - Numeric identifier for error
      sqlState - 5-character identifier for error
      severity - Severity
  • Method Details

    • getErrorMessage

      public String getErrorMessage()
      Returns a human-readable error message.
    • getErrorCode

      public int getErrorCode()
      Returns a numeric code for this error.
    • getSqlState

      public String getSqlState()
      Returns the five-character identifier for this error.
    • getSeverity

      public AvaticaSeverity getSeverity()
      Returns the severity at which this exception is thrown.
    • toString

      public String toString()
      Overrides:
      toString in class Throwable