Package org.apache.calcite.avatica
Class AvaticaSqlException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
org.apache.calcite.avatica.AvaticaSqlException
- All Implemented Interfaces:
Serializable,Iterable<Throwable>
A client-facing
SQLException which encapsulates errors from the remote Avatica server.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprintStackTrace(PrintStream stream) voidprintStackTrace(PrintWriter writer) Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, iterator, setNextExceptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
AvaticaSqlException
public AvaticaSqlException(String errorMessage, String sqlState, int errorCode, List<String> stackTraces, String remoteServer) Construct the Exception with information from the server.- Parameters:
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 located
-
-
Method Details
-
getErrorMessage
-
getStackTraces
- Returns:
- The stacktraces for exceptions thrown on the Avatica server.
-
getRemoteServer
- Returns:
- The host:port for the remote Avatica server. May be null.
-
printStackTrace
- Overrides:
printStackTracein classThrowable
-
printStackTrace
- Overrides:
printStackTracein classThrowable
-