Package org.craftercms.commons.rest
Class BaseRestExceptionHandlers
- java.lang.Object
-
- org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
- org.craftercms.commons.rest.BaseRestExceptionHandlers
-
@ControllerAdvice public class BaseRestExceptionHandlers extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
Class that provides the basicExceptionHandler
s for Crafter REST services.- Author:
- avasquez
-
-
Constructor Summary
Constructors Constructor Description BaseRestExceptionHandlers()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.http.ResponseEntity<Object>
handleExceptionInternal(Exception ex, Object body, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request)
protected org.springframework.http.ResponseEntity<Object>
handleExceptionInternal(Exception ex, String message, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleGeneralException(Exception ex, org.springframework.web.context.request.WebRequest webRequest)
-
Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
handleAsyncRequestTimeoutException, handleBindException, handleConversionNotSupported, handleException, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMethodArgumentNotValid, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleServletRequestBindingException, handleTypeMismatch
-
-
-
-
Method Detail
-
handleGeneralException
@ExceptionHandler(java.lang.Exception.class) public org.springframework.http.ResponseEntity<Object> handleGeneralException(Exception ex, org.springframework.web.context.request.WebRequest webRequest)
-
handleExceptionInternal
protected org.springframework.http.ResponseEntity<Object> handleExceptionInternal(Exception ex, String message, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request)
-
handleExceptionInternal
protected org.springframework.http.ResponseEntity<Object> handleExceptionInternal(Exception ex, Object body, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request)
- Overrides:
handleExceptionInternal
in classorg.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
-