Package co.arago.hiro.client.exceptions
Class WebSocketMessageException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- co.arago.hiro.client.exceptions.HiroException
-
- co.arago.hiro.client.exceptions.WebSocketMessageException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
UnauthorizedWebSocketException
public class WebSocketMessageException extends HiroException
A base exception for WebSockets. Contains an error code.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WebSocketMessageException(java.lang.String message, int code)Constructs a new exception with the specified detail message.WebSocketMessageException(java.lang.String message, int code, java.lang.Throwable cause)Constructs a new exception with the specified detail message and cause.WebSocketMessageException(java.lang.String message, int code, java.lang.Throwable cause, boolean enableSuppression, boolean writableStackTrace)Constructs a new exception with the specified detail message, cause, suppression enabled or disabled, and writable stack trace enabled or disabled.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCode()get the error codejava.lang.StringtoString()
-
-
-
Constructor Detail
-
WebSocketMessageException
public WebSocketMessageException(java.lang.String message, int code)Constructs a new exception with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call toThrowable.initCause(java.lang.Throwable).- Parameters:
message- the detail message. The detail message is saved for later retrieval by theThrowable.getMessage()method.code- The code for the error (Similar to a HTTP status code).
-
WebSocketMessageException
public WebSocketMessageException(java.lang.String message, int code, java.lang.Throwable cause)Constructs a new exception with the specified detail message and cause.Note that the detail message associated with
causeis not automatically incorporated in this exception's detail message.- Parameters:
message- the detail message (which is saved for later retrieval by theThrowable.getMessage()method).code- The code for the error (Similar to a HTTP status code).cause- the cause (which is saved for later retrieval by theThrowable.getCause()method). (Anullvalue is permitted, and indicates that the cause is nonexistent or unknown.)- Since:
- 1.4
-
WebSocketMessageException
public WebSocketMessageException(java.lang.String message, int code, java.lang.Throwable cause, boolean enableSuppression, boolean writableStackTrace)Constructs a new exception with the specified detail message, cause, suppression enabled or disabled, and writable stack trace enabled or disabled.- Parameters:
message- the detail message.code- The code for the error (Similar to a HTTP status code).cause- the cause. (Anullvalue is permitted, and indicates that the cause is nonexistent or unknown.)enableSuppression- whether or not suppression is enabled or disabledwritableStackTrace- whether or not the stack trace should be writable- Since:
- 1.7
-
-