@RestControllerAdvice public class ApiExceptionalHandler extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
WHITESPACE |
| Constructor and Description |
|---|
ApiExceptionalHandler() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> |
defaultErrorHandler(javax.servlet.http.HttpServletRequest httpServletRequest,
Exception exception)
Method to handle
RuntimeException. |
org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> |
emptyLengthException(javax.servlet.http.HttpServletRequest httpServletRequest,
EmptyInputException e)
Method to handle
EmptyInputException. |
org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> |
inputLengthException(javax.servlet.http.HttpServletRequest httpServletRequest,
InputLengthException e)
Method to handle
InputLengthException. |
org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> |
onHttpMessageNotReadable(javax.servlet.http.HttpServletRequest httpServletRequest,
org.springframework.http.converter.HttpMessageNotReadableException exception)
Method to handle
HttpMessageNotReadableException. |
public static final String WHITESPACE
@ExceptionHandler(value=InputLengthException.class) public org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> inputLengthException(javax.servlet.http.HttpServletRequest httpServletRequest, InputLengthException e) throws IOException
InputLengthException.httpServletRequest - servelet request.e - the exception.IOException@ExceptionHandler(value=EmptyInputException.class) public org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> emptyLengthException(javax.servlet.http.HttpServletRequest httpServletRequest, EmptyInputException e) throws IOException
EmptyInputException.httpServletRequest - servelet request.e - the exception.IOException@ExceptionHandler(value=org.springframework.http.converter.HttpMessageNotReadableException.class) public org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> onHttpMessageNotReadable(javax.servlet.http.HttpServletRequest httpServletRequest, org.springframework.http.converter.HttpMessageNotReadableException exception) throws IOException
HttpMessageNotReadableException.exception - the exception.ErrorResponse.IOException@ExceptionHandler(value={java.lang.Exception.class,java.lang.RuntimeException.class})
public org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> defaultErrorHandler(javax.servlet.http.HttpServletRequest httpServletRequest,
Exception exception)
throws IOException
RuntimeException.request - the servlet request.exception - the exception.ErrorResponse.IOExceptionCopyright © 2020. All rights reserved.