Class ReplyException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.vertx.core.VertxException
io.vertx.core.eventbus.ReplyException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ServiceException
Represents the failure of a message send.
If a message was sent specifying a reply handler and the message delivery fails, a failure will be provided to the reply handler and the cause of the failure will be an instance of this.
- Author:
- Tim Fox
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionReplyException(ReplyFailure failureType) Create a ReplyExceptionReplyException(ReplyFailure failureType, int failureCode, String message) Create a ReplyExceptionReplyException(ReplyFailure failureType, int failureCode, String message, boolean noStackTrace) Create a ReplyException with all attributes.protectedReplyException(ReplyFailure failureType, int failureCode, String message, Throwable cause, boolean noStackTrace) Create a ReplyException with all attributes, including cause.
DefaultReplyExceptionMessageCodecdoesn't support Cause!ReplyException(ReplyFailure failureType, String message) Create a ReplyException -
Method Summary
Modifier and TypeMethodDescriptionintGet the failure code for the messageGet the failure type for the messagetoString()Methods inherited from class VertxException
noStackTrace, noStackTrace, noStackTraceMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ReplyException
public ReplyException(ReplyFailure failureType, int failureCode, String message, boolean noStackTrace) Create a ReplyException with all attributes.- Parameters:
failureType- the failure typefailureCode- the failure code (e.g. 404)message- the failure message
-
ReplyException
protected ReplyException(ReplyFailure failureType, int failureCode, String message, Throwable cause, boolean noStackTrace) Create a ReplyException with all attributes, including cause.
DefaultReplyExceptionMessageCodecdoesn't support Cause!
This ctor is meant to be used for extension, together with a custom codec.- Parameters:
failureType- the failure typefailureCode- the failure code (e.g. 404)message- the failure message
-
ReplyException
Create a ReplyException- Parameters:
failureType- the failure typefailureCode- the failure codemessage- the failure message
-
ReplyException
Create a ReplyException- Parameters:
failureType- the failure typemessage- the failure message
-
ReplyException
Create a ReplyException- Parameters:
failureType- the failure type
-
-
Method Details
-
failureType
-
failureCode
public int failureCode()Get the failure code for the message- Returns:
- the failure code
-
toString
-