Class AxonServerRemoteCommandHandlingException

All Implemented Interfaces:
Serializable

public class AxonServerRemoteCommandHandlingException extends RemoteHandlingException
Exception indicating a problem that was reported by the remote end of a connection.

By default, a stack trace is not generated for this exception. However, the stack trace creation can be enforced explicitly via the constructor accepting the writableStackTrace parameter.

Since:
4.0
Author:
Marc Gathier
See Also:
  • Constructor Details

    • AxonServerRemoteCommandHandlingException

      public AxonServerRemoteCommandHandlingException(String errorCode, io.axoniq.axonserver.grpc.ErrorMessage errorMessage)
      Initialize the exception with given errorCode and errorMessage.
      Parameters:
      errorCode - the code reported by the server
      errorMessage - the message describing the exception on the remote end
    • AxonServerRemoteCommandHandlingException

      public AxonServerRemoteCommandHandlingException(String errorCode, io.axoniq.axonserver.grpc.ErrorMessage errorMessage, boolean writableStackTrace)
      Initialize the exception with given errorCode, errorMessage and writableStackTrace.
      Parameters:
      errorCode - the code reported by the server
      errorMessage - the message describing the exception on the remote end
      writableStackTrace - whether the stack trace should be generated (true) or not (false)
  • Method Details

    • getOriginServer

      public String getOriginServer()
      Returns the name of the server that reported the error.
      Returns:
      the name of the server that reported the error
    • getErrorCode

      public String getErrorCode()
      Returns the error code as reported by the server.
      Returns:
      the error code as reported by the server
    • toString

      public String toString()
      Overrides:
      toString in class Throwable