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>

public class AvaticaSqlException extends SQLException
A client-facing SQLException which encapsulates errors from the remote Avatica server.
See Also:
  • 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

      public String getErrorMessage()
    • getStackTraces

      public List<String> getStackTraces()
      Returns:
      The stacktraces for exceptions thrown on the Avatica server.
    • getRemoteServer

      public String getRemoteServer()
      Returns:
      The host:port for the remote Avatica server. May be null.
    • printStackTrace

      public void printStackTrace(PrintStream stream)
      Overrides:
      printStackTrace in class Throwable
    • printStackTrace

      public void printStackTrace(PrintWriter writer)
      Overrides:
      printStackTrace in class Throwable