Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.automation.server.jaxrs
Class ExceptionHandler

java.lang.Object
  extended by org.nuxeo.ecm.automation.server.jaxrs.ExceptionHandler

public class ExceptionHandler
extends Object

Author:
Bogdan Stefanescu

Constructor Summary
ExceptionHandler(String message, Throwable cause)
           
 
Method Summary
static void abort(String message, Throwable cause)
           
static void abort(Throwable cause)
           
 String getMessage()
           
 String getSerializedStackTrace()
           
 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)
           
 String getType()
           
static WebApplicationException newException(String message, Throwable cause)
           
static WebApplicationException newException(Throwable cause)
           
 void setStatus(int status)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionHandler

public ExceptionHandler(String message,
                        Throwable cause)
Method Detail

newException

public static WebApplicationException newException(Throwable cause)

newException

public static WebApplicationException newException(String message,
                                                   Throwable cause)

abort

public static void abort(String message,
                         Throwable cause)
                  throws WebApplicationException
Throws:
WebApplicationException

abort

public static void abort(Throwable cause)
                  throws WebApplicationException
Throws:
WebApplicationException

getStatus

public static int getStatus(Throwable cause)
Tries to find the best matching HTTP status for the given exception.


getStatus

public static int getStatus(Throwable cause,
                            int depth)

getStatus

public int getStatus()

getType

public String getType()

setStatus

public void setStatus(int status)

getMessage

public String getMessage()

getSerializedStackTrace

public String getSerializedStackTrace()

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.