Package io.axoniq.axonserver.connector
Class AxonServerException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.axoniq.axonserver.connector.AxonServerException
-
- All Implemented Interfaces:
Serializable
public class AxonServerException extends RuntimeException
Exception that represents an Error reported by AxonServer.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AxonServerException(ErrorCategory errorCategory, String message, String location)Initialize the exception for an error in the givenerrorCategory, explained by the givenmessage, which occurred in givenlocation.AxonServerException(ErrorCategory errorCategory, String message, String location, Throwable cause)Initialize the exception for an error in the givenerrorCategory, explained by the givenmessage, which occurred in givenlocationand caused by the givencause.AxonServerException(ErrorCategory errorCategory, String message, String location, List<String> details, Throwable cause)Initialize the exception for an error in the givenerrorCategory, explained by the givenmessageanddetails, which occurred in givenlocationand caused by the givencause.AxonServerException(ErrorMessage errorMessage)Initialize the exception for the error reported in the givenerrorMessage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getDetails()Returns the list of messages detailing the underlying cause.ErrorCategorygetErrorCategory()Returns the category of the error that caused this exception.StringgetLocation()Returns the identifier of the location where the exception occurred.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
AxonServerException
public AxonServerException(ErrorMessage errorMessage)
Initialize the exception for the error reported in the givenerrorMessage.- 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 givenerrorCategory, explained by the givenmessage, which occurred in givenlocation.- Parameters:
errorCategory- the category of error occurringmessage- the message describing the exceptionlocation- 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 givenerrorCategory, explained by the givenmessage, which occurred in givenlocationand caused by the givencause.- Parameters:
errorCategory- the category of error occurringmessage- the message describing the exceptionlocation- the location (AxonServer, client Id) where the error occurredcause- the underlying cause of the exception. May benull
-
AxonServerException
public AxonServerException(ErrorCategory errorCategory, String message, String location, List<String> details, Throwable cause)
Initialize the exception for an error in the givenerrorCategory, explained by the givenmessageanddetails, which occurred in givenlocationand caused by the givencause.- Parameters:
errorCategory- the category of error occurringmessage- the message describing the exceptionlocation- the location (AxonServer, client Id) where the error occurreddetails- a list of messages detailing underlying causescause- the underlying cause of the exception. May benull
-
-
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
-
-