public class XServletException extends javax.servlet.ServletException
 It extends ServletException so it can be
 handled in the Servlet.service method of the JsonRestServlet.
| Constructor and Description | 
|---|
XServletException(int httpStatusCode,
                                  ErrorCode errorCode,
                                  Object... params)
Create a XServletException that triggers a specified HTTP error code. 
 | 
XServletException(int httpStatusCode,
                                  XException ex)
Create a DagXServletException that triggers a HTTP BAD_REQUEST (400). 
 | 
| Modifier and Type | Method and Description | 
|---|---|
ErrorCode | 
getErrorCode()
Return the Oozie error code for the exception. 
 | 
int | 
getHttpStatusCode()
Return the HTTP error code to return to the client. 
 | 
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic XServletException(int httpStatusCode, XException ex)
httpStatusCode - HTTP error code to return.ex - causepublic XServletException(int httpStatusCode, ErrorCode errorCode, Object... params)
httpStatusCode - HTTP error code to return.errorCode - Oozie error code.params - paramaters to use in the error code template. If the last parameter is an Exception,public ErrorCode getErrorCode()
public int getHttpStatusCode()
Copyright © 2016 Apache Software Foundation. All rights reserved.