public class AvaticaSqlException extends SQLException
SQLException which encapsulates errors from the remote Avatica server.| Modifier and Type | Class and Description |
|---|---|
private static class |
AvaticaSqlException.PrintStreamOrWriter
A class that encapsulates either a PrintStream or a PrintWriter.
|
| Modifier and Type | Field and Description |
|---|---|
private String |
errorMessage |
private String |
remoteServer |
private static long |
serialVersionUID |
private List<String> |
stackTraces |
| Constructor and Description |
|---|
AvaticaSqlException(String errorMessage,
String sqlState,
int errorCode,
List<String> stackTraces,
String remoteServer)
Construct the Exception with information from the server.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorMessage() |
String |
getRemoteServer() |
List<String> |
getStackTraces() |
(package private) void |
printServerStackTrace(AvaticaSqlException.PrintStreamOrWriter streamOrWriter) |
void |
printStackTrace(PrintStream stream) |
void |
printStackTrace(PrintWriter writer) |
getErrorCode, getNextException, getSQLState, iterator, setNextExceptionaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toStringprivate static final long serialVersionUID
private final String errorMessage
private final String remoteServer
public AvaticaSqlException(String errorMessage, String sqlState, int errorCode, List<String> stackTraces, String remoteServer)
errorMessage - A human-readable error message.errorCode - An integer corresponding to a known error.stackTraces - Server-side stacktrace.remoteServer - The host:port where the Avatica server is locatedpublic String getErrorMessage()
public List<String> getStackTraces()
public String getRemoteServer()
public void printStackTrace(PrintStream stream)
printStackTrace in class Throwablepublic void printStackTrace(PrintWriter writer)
printStackTrace in class Throwablevoid printServerStackTrace(AvaticaSqlException.PrintStreamOrWriter streamOrWriter)
Copyright © 2012–2016 The Apache Software Foundation. All rights reserved.