Class ServiceException

    • Constructor Detail

      • 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 Detail

      • 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.