io.vertx.serviceproxy

## Class ServiceException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - io.vertx.core.VertxException
        - - io.vertx.core.eventbus.ReplyException
          - - io.vertx.serviceproxy.ServiceException

- All Implemented Interfaces:
    Serializable

      public class ServiceException
      extends ReplyException

  An Exception to be returned from Service implementations.
  Author:
    Dan O'Reilly
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServiceException(int failureCode, String message)` Create a ServiceException.
    `ServiceException(int failureCode, String message, JsonObject debugInfo)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> AsyncResult<T>` | `fail(int failureCode, String message)` Create a failed Future containing a ServiceException.
    `static <T> AsyncResult<T>` | `fail(int failureCode, String message, JsonObject debugInfo)` Create a failed Future containing a ServiceException.
    `JsonObject` | `getDebugInfo()` Get the Debugging information provided to this ServiceException

    - ### Methods inherited from class io.vertx.core.eventbus.ReplyException

      `failureCode, failureType, toString`

    - ### Methods inherited from class java.lang.Throwable

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

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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> AsyncResult<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> AsyncResult<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.

Copyright © 2021 Eclipse. All rights reserved.