Apache CXF API

org.apache.cxf.jaxrs.utils
Class ExceptionUtils

java.lang.Object
  extended by org.apache.cxf.jaxrs.utils.ExceptionUtils

public final class ExceptionUtils
extends Object


Method Summary
static
<T extends Throwable>
javax.ws.rs.core.Response
convertFaultToResponse(T ex, Message currentMessage)
           
static Class<?> getWebApplicationExceptionClass(javax.ws.rs.core.Response exResponse, Class<?> defaultExceptionType)
           
static boolean propogateException(Message m)
           
static javax.ws.rs.WebApplicationException toBadRequestException(Throwable cause, javax.ws.rs.core.Response response)
           
static javax.ws.rs.WebApplicationException toForbiddenException(Throwable cause, javax.ws.rs.core.Response response)
           
static javax.ws.rs.WebApplicationException toHttpException(Throwable cause, javax.ws.rs.core.Response response)
           
static javax.ws.rs.WebApplicationException toInternalServerErrorException(Throwable cause, javax.ws.rs.core.Response response)
           
static javax.ws.rs.WebApplicationException toNotAcceptableException(Throwable cause, javax.ws.rs.core.Response response)
           
static javax.ws.rs.WebApplicationException toNotAuthorizedException(Throwable cause, javax.ws.rs.core.Response response)
           
static javax.ws.rs.WebApplicationException toNotFoundException(Throwable cause, javax.ws.rs.core.Response response)
           
static javax.ws.rs.WebApplicationException toNotSupportedException(Throwable cause, javax.ws.rs.core.Response response)
           
static javax.ws.rs.WebApplicationException toWebApplicationException(Throwable cause, javax.ws.rs.core.Response response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWebApplicationExceptionClass

public static Class<?> getWebApplicationExceptionClass(javax.ws.rs.core.Response exResponse,
                                                       Class<?> defaultExceptionType)

propogateException

public static boolean propogateException(Message m)

convertFaultToResponse

public static <T extends Throwable> javax.ws.rs.core.Response convertFaultToResponse(T ex,
                                                                                     Message currentMessage)

toWebApplicationException

public static javax.ws.rs.WebApplicationException toWebApplicationException(Throwable cause,
                                                                            javax.ws.rs.core.Response response)

toInternalServerErrorException

public static javax.ws.rs.WebApplicationException toInternalServerErrorException(Throwable cause,
                                                                                 javax.ws.rs.core.Response response)

toBadRequestException

public static javax.ws.rs.WebApplicationException toBadRequestException(Throwable cause,
                                                                        javax.ws.rs.core.Response response)

toNotFoundException

public static javax.ws.rs.WebApplicationException toNotFoundException(Throwable cause,
                                                                      javax.ws.rs.core.Response response)

toNotAuthorizedException

public static javax.ws.rs.WebApplicationException toNotAuthorizedException(Throwable cause,
                                                                           javax.ws.rs.core.Response response)

toForbiddenException

public static javax.ws.rs.WebApplicationException toForbiddenException(Throwable cause,
                                                                       javax.ws.rs.core.Response response)

toNotAcceptableException

public static javax.ws.rs.WebApplicationException toNotAcceptableException(Throwable cause,
                                                                           javax.ws.rs.core.Response response)

toNotSupportedException

public static javax.ws.rs.WebApplicationException toNotSupportedException(Throwable cause,
                                                                          javax.ws.rs.core.Response response)

toHttpException

public static javax.ws.rs.WebApplicationException toHttpException(Throwable cause,
                                                                  javax.ws.rs.core.Response response)

Apache CXF API

Apache CXF