public final class HttpRuntimeException extends RuntimeException
RuntimeException meant to wrap a non-RuntimeException.| Constructor and Description |
|---|
HttpRuntimeException(Throwable t)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getInner()
Returns the wrapped throwable.
|
static RuntimeException |
toHttpException(Throwable t,
Class<?> ec)
Takes in an arbitrary
Throwable and converts it to an appropriate runtime exception for producing an
HTTP response. |
static RuntimeException |
toHttpException(Throwable t,
Class<?> ec,
String msg,
Object... args)
Takes in an arbitrary
Throwable and converts it to an appropriate runtime exception for producing an
HTTP response. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic HttpRuntimeException(Throwable t)
t - Wrapped exception.public static RuntimeException toHttpException(Throwable t, Class<?> ec)
Throwable and converts it to an appropriate runtime exception for producing an
HTTP response.t - The throwable to wrap.ec - The exception class to create if the specified throwable cannot produce a valid HTTP response.public static RuntimeException toHttpException(Throwable t, Class<?> ec, String msg, Object... args)
Throwable and converts it to an appropriate runtime exception for producing an
HTTP response.t - The throwable to wrap.ec - The exception class to create if the specified throwable cannot produce a valid HTTP response.msg - The message text to pass to the ec class constructor.args - The message arguments to pass to the ec class constructor.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.