Interface ExceptionMapper<E extends Throwable>

  • Type Parameters:
    E - exception type supported by the provider.

    public interface ExceptionMapper<E extends Throwable>
    Contract for a provider that maps Java exceptions to Response.

    Providers implementing ExceptionMapper contract must be either programmatically registered in an API runtime or must be annotated with @Provider annotation to be automatically discovered by the runtime during a provider scanning phase.

    Paul Sandoz, Marc Hadley
    See Also:
    Provider, Response
    • Method Summary

      Modifier and Type Method Description
      Response toResponse​(E exception)
      Map an exception to a Response.