public class WebException extends javax.ws.rs.WebApplicationException
Modifier and Type | Field and Description |
---|---|
protected Throwable |
cause |
protected static org.apache.commons.logging.Log |
log |
protected String |
message |
protected int |
status |
protected String |
type |
Modifier | Constructor and Description |
---|---|
|
WebException() |
|
WebException(int status) |
|
WebException(javax.ws.rs.core.Response.Status status) |
|
WebException(javax.ws.rs.core.Response response) |
|
WebException(String message) |
|
WebException(String message,
int code) |
|
WebException(String message,
Throwable cause) |
|
WebException(String message,
Throwable cause,
int status) |
protected |
WebException(Throwable cause) |
protected |
WebException(Throwable cause,
int status) |
protected |
WebException(Throwable cause,
javax.ws.rs.core.Response.Status status)
Use WebException.wrap() and not the constructor.
|
Modifier and Type | Method and Description |
---|---|
Throwable |
getCause() |
String |
getHelpUrl() |
String |
getMessage() |
String |
getRequestId() |
int |
getReturnCode()
Deprecated.
|
String |
getStackTraceString() |
int |
getStatus() |
static int |
getStatus(Throwable cause)
Tries to find the best matching HTTP status for the given exception.
|
static int |
getStatus(Throwable cause,
int depth) |
int |
getStatusCode() |
String |
getType() |
static Object |
handleError(javax.ws.rs.WebApplicationException e) |
static boolean |
isSecurityError(Throwable t) |
static WebException |
newException(String message,
Throwable cause) |
static WebException |
newException(String message,
Throwable cause,
int status) |
static WebException |
newException(Throwable cause) |
void |
setStatus(int status) |
javax.ws.rs.core.Response |
toResponse()
Handle if needed custom error webengine module handler.
|
static javax.ws.rs.core.Response |
toResponse(Throwable t)
Deprecated.
|
static String |
toString(Throwable t) |
protected javax.ws.rs.core.Response |
toWebModuleResponse(WebContext ctx)
Ask Webengine module for custom error handling and response.
|
static WebException |
wrap(String message,
Throwable exception) |
static WebException |
wrap(Throwable e) |
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
protected static final org.apache.commons.logging.Log log
protected int status
public WebException()
public WebException(javax.ws.rs.core.Response response)
public WebException(int status)
public WebException(javax.ws.rs.core.Response.Status status)
protected WebException(Throwable cause, javax.ws.rs.core.Response.Status status)
protected WebException(Throwable cause, int status)
protected WebException(Throwable cause)
public WebException(String message)
public WebException(String message, int code)
public WebException(String message, Throwable cause, int status)
public WebException(String message, Throwable cause)
public static WebException newException(String message, Throwable cause)
public static WebException newException(Throwable cause)
public static WebException newException(String message, Throwable cause, int status)
public static WebException wrap(Throwable e)
public static WebException wrap(String message, Throwable exception)
public static Object handleError(javax.ws.rs.WebApplicationException e)
public static int getStatus(Throwable cause)
public static boolean isSecurityError(Throwable t)
@Deprecated public static javax.ws.rs.core.Response toResponse(Throwable t)
public String getMessage()
getMessage
in class Throwable
public int getStatusCode()
public String getStackTraceString()
@Deprecated public int getReturnCode()
public javax.ws.rs.core.Response toResponse()
protected javax.ws.rs.core.Response toWebModuleResponse(WebContext ctx)
public int getStatus()
public void setStatus(int status)
public String getRequestId()
public String getHelpUrl()
Copyright © 2017 Nuxeo. All rights reserved.