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 an HookException with the specified error code and detail message.
  • Method Summary

    Modifier and Type Method Description
    int getCode()
    Returns the error code.

    Methods inherited from class java.lang.Throwable

    addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • HookException

      public HookException​(int code, java.lang.String message)
      Constructs an HookException 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 by 0
      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