Class AvaticaRuntimeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.calcite.avatica.remote.AvaticaRuntimeException
-
- All Implemented Interfaces:
java.io.Serializable
public class AvaticaRuntimeException extends java.lang.RuntimeExceptionARuntimeExceptionthrown by Avatica with additional contextual information about what happened to cause the Exception.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private interrorCodeprivate java.lang.StringerrorMessageprivate static longserialVersionUIDprivate AvaticaSeverityseverityprivate java.lang.StringsqlState
-
Constructor Summary
Constructors Constructor Description AvaticaRuntimeException()Constructs anAvaticaRuntimeExceptionwith no additional information.AvaticaRuntimeException(java.lang.String errorMessage, int errorCode, java.lang.String sqlState, AvaticaSeverity severity)Constructs anAvaticaRuntimeExceptionwith the given contextual information surrounding the error.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetErrorCode()Returns a numeric code for this error.java.lang.StringgetErrorMessage()Returns a human-readable error message.AvaticaSeveritygetSeverity()Returns the severity at which this exception is thrown.java.lang.StringgetSqlState()Returns the five-character identifier for this error.java.lang.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
errorMessage
private final java.lang.String errorMessage
-
errorCode
private final int errorCode
-
sqlState
private final java.lang.String sqlState
-
severity
private final AvaticaSeverity severity
-
-
Constructor Detail
-
AvaticaRuntimeException
public AvaticaRuntimeException()
Constructs anAvaticaRuntimeExceptionwith no additional information.It is strongly preferred that the caller invoke
AvaticaRuntimeException(String, int, String, AvaticaSeverity)with proper contextual information.
-
AvaticaRuntimeException
public AvaticaRuntimeException(java.lang.String errorMessage, int errorCode, java.lang.String sqlState, AvaticaSeverity severity)Constructs anAvaticaRuntimeExceptionwith the given contextual information surrounding the error.- Parameters:
errorMessage- A human-readable explanation about what happenederrorCode- Numeric identifier for errorsqlState- 5-character identifier for errorseverity- Severity
-
-
Method Detail
-
getErrorMessage
public java.lang.String getErrorMessage()
Returns a human-readable error message.
-
getErrorCode
public int getErrorCode()
Returns a numeric code for this error.
-
getSqlState
public java.lang.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 java.lang.String toString()
- Overrides:
toStringin classjava.lang.Throwable
-
-