Class ServiceException

All Implemented Interfaces:
Serializable

public class ServiceException extends ReplyException
An Exception to be returned from Service implementations.
Author:
Dan O'Reilly
See Also:
  • Constructor Details

    • ServiceException

      public ServiceException(int failureCode, String message)
      Create a ServiceException.
      Parameters:
      failureCode - The failure code.
      message - The failure message.
    • ServiceException

      public ServiceException(int failureCode, String message, JsonObject debugInfo)
  • Method Details

    • getDebugInfo

      public JsonObject getDebugInfo()
      Get the Debugging information provided to this ServiceException
      Returns:
      The debug info.
    • fail

      public static <T> Future<T> fail(int failureCode, String message)
      Create a failed Future containing a ServiceException.
      Type Parameters:
      T - The type of the AsyncResult.
      Parameters:
      failureCode - The failure code.
      message - The failure message.
      Returns:
      A failed Future containing the ServiceException.
    • fail

      public static <T> Future<T> fail(int failureCode, String message, JsonObject debugInfo)
      Create a failed Future containing a ServiceException.
      Type Parameters:
      T - The type of the AsyncResult.
      Parameters:
      failureCode - The failure code.
      message - The failure message.
      debugInfo - The debug info.
      Returns:
      A failed Future containing the ServiceException.