Package org.n52.web.exception
Class ExceptionResponse
- java.lang.Object
-
- org.n52.web.exception.ExceptionResponse
-
public final class ExceptionResponse extends Object
Wraps all
WebExceptions thrown by controlled workflow. If unexpected Exceptions occur a generalInternalServerExceptionshould be wrapped so that all exceptions interrupting the expected workflow can be serialized and returned to the requesting user/service.To ensure all exceptions are handled and communicated to the user all Web bindings shall inherit from
BaseControllerwhich is configured by default to serve as a centralExceptionHandler.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExceptionResponsecreateExceptionResponse(WebException e, org.springframework.http.HttpStatus statusCode)StringgetDeveloperMessage()String[]getHints()StringgetReason()intgetStatusCode()StringgetUserMessage()
-
-
-
Method Detail
-
getStatusCode
public int getStatusCode()
-
getReason
public String getReason()
-
getUserMessage
public String getUserMessage()
-
getDeveloperMessage
public String getDeveloperMessage()
-
getHints
public String[] getHints()
-
createExceptionResponse
public static ExceptionResponse createExceptionResponse(WebException e, org.springframework.http.HttpStatus statusCode)
-
-