Class AxonServerException

    • Constructor Detail

      • AxonServerException

        public AxonServerException​(ErrorMessage errorMessage)
        Initialize the exception for the error reported in the given errorMessage.
        Parameters:
        errorMessage - the ErrorMessage provided by AxonServer to describe the error
      • AxonServerException

        public AxonServerException​(ErrorCategory errorCategory,
                                   String message,
                                   String location)
        Initialize the exception for an error in the given errorCategory, explained by the given message, which occurred in given location.
        Parameters:
        errorCategory - the category of error occurring
        message - the message describing the exception
        location - the location (AxonServer, client Id) where the error occurred
      • AxonServerException

        public AxonServerException​(ErrorCategory errorCategory,
                                   String message,
                                   String location,
                                   Throwable cause)
        Initialize the exception for an error in the given errorCategory, explained by the given message, which occurred in given location and caused by the given cause.
        Parameters:
        errorCategory - the category of error occurring
        message - the message describing the exception
        location - the location (AxonServer, client Id) where the error occurred
        cause - the underlying cause of the exception. May be null
      • AxonServerException

        public AxonServerException​(ErrorCategory errorCategory,
                                   String message,
                                   String location,
                                   List<String> details,
                                   Throwable cause)
        Initialize the exception for an error in the given errorCategory, explained by the given message and details, which occurred in given location and caused by the given cause.
        Parameters:
        errorCategory - the category of error occurring
        message - the message describing the exception
        location - the location (AxonServer, client Id) where the error occurred
        details - a list of messages detailing underlying causes
        cause - the underlying cause of the exception. May be null
    • Method Detail

      • getErrorCategory

        public ErrorCategory getErrorCategory()
        Returns the category of the error that caused this exception.
        Returns:
        the category of the error that caused this exception
      • getDetails

        public List<String> getDetails()
        Returns the list of messages detailing the underlying cause. The returned list is unmodifiable.
        Returns:
        the list of messages detailing the underlying cause
      • getLocation

        public String getLocation()
        Returns the identifier of the location where the exception occurred.
        Returns:
        the identifier of the location where the exception occurred