public class AvaticaRuntimeException extends RuntimeException
RuntimeException thrown by Avatica with additional contextual information about
what happened to cause the Exception.| Modifier and Type | Field and Description |
|---|---|
private int |
errorCode |
private String |
errorMessage |
private static long |
serialVersionUID |
private AvaticaSeverity |
severity |
private String |
sqlState |
| Constructor and Description |
|---|
AvaticaRuntimeException()
Constructs an
AvaticaRuntimeException with no additional information. |
AvaticaRuntimeException(String errorMessage,
int errorCode,
String sqlState,
AvaticaSeverity severity)
Constructs an
AvaticaRuntimeException with the given
contextual information surrounding the error. |
| Modifier and Type | Method and Description |
|---|---|
int |
getErrorCode()
Returns a numeric code for this error.
|
String |
getErrorMessage()
Returns a human-readable error message.
|
AvaticaSeverity |
getSeverity()
Returns the severity at which this exception is thrown.
|
String |
getSqlState()
Returns the five-character identifier for this error.
|
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTraceprivate static final long serialVersionUID
private final String errorMessage
private final int errorCode
private final String sqlState
private final AvaticaSeverity severity
public AvaticaRuntimeException()
AvaticaRuntimeException with no additional information.
It is strongly preferred that the caller invoke
AvaticaRuntimeException(String, int, String, AvaticaSeverity)
with proper contextual information.
public AvaticaRuntimeException(String errorMessage, int errorCode, String sqlState, AvaticaSeverity severity)
AvaticaRuntimeException with the given
contextual information surrounding the error.errorMessage - A human-readable explanation about what happenederrorCode - Numeric identifier for errorsqlState - 5-character identifier for errorseverity - Severitypublic String getErrorMessage()
public int getErrorCode()
public String getSqlState()
public AvaticaSeverity getSeverity()
Copyright © 2012–2016 The Apache Software Foundation. All rights reserved.