Package cool.mqtt.hooks
Class HookException
java.lang.Object
java.lang.Throwable
java.lang.Exception
cool.mqtt.hooks.HookException
- All Implemented Interfaces:
java.io.Serializable
public class HookException
extends java.lang.Exception
Exception class used by the Hook to signal an error condition.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description HookException(int code, java.lang.String message)
Constructs anHookException
with the specified error code and detail message. -
Method Summary
Modifier and Type Method Description int
getCode()
Returns the error code.
-
Constructor Details
-
HookException
public HookException(int code, java.lang.String message)Constructs anHookException
with the specified error code and detail message.- Parameters:
code
- the error code that can be used to distinguish the kind of problem. It must be a non negative integer, otherwise it will be replaced by0
message
- the detail message to be forwarded to the Client. It can be null. The message should be in simple ASCII, otherwise it might be altered in order to be sent to the client; multiline text is also not allowed
-
-
Method Details
-
getCode
public int getCode()Returns the error code.- Returns:
- the error code
-