|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
javax.servlet.ServletException
org.apache.oozie.servlet.XServletException
public class XServletException
Specialized Oozie servlet exception that uses Oozie error codes.
It extends ServletException so it can be handled in theServlet.service method of the JsonRestServlet.
| Constructor Summary | |
|---|---|
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). |
|
| Method Summary | |
|---|---|
ErrorCode |
getErrorCode()
Return the Oozie error code for the exception. |
int |
getHttpStatusCode()
Return the HTTP error code to return to the client. |
| Methods inherited from class javax.servlet.ServletException |
|---|
getRootCause |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XServletException(int httpStatusCode,
XException ex)
httpStatusCode - HTTP error code to return.ex - cause
public 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,| Method Detail |
|---|
public ErrorCode getErrorCode()
public int getHttpStatusCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||