@RestControllerAdvice public class LicenseKeyControllerAdvice extends Object
LicenseKeyServiceException,
InvalidArgumentsException.| Constructor and Description |
|---|
LicenseKeyControllerAdvice() |
| 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>> |
handleServiceException(javax.servlet.http.HttpServletRequest httpServletRequest,
LicenseKeyServiceException exception)
Method to handle
LicenseKeyServiceException. |
org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> |
onHttpMessageNotReadable(javax.servlet.http.HttpServletRequest httpServletRequest,
org.springframework.http.converter.HttpMessageNotReadableException exception)
Method to handle
HttpMessageNotReadableException. |
org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> |
validateInputArguments(javax.servlet.http.HttpServletRequest httpServletRequest,
InvalidArgumentsException exception)
Method to handle
InvalidArgumentsException. |
@ExceptionHandler(value=InvalidArgumentsException.class) public org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> validateInputArguments(javax.servlet.http.HttpServletRequest httpServletRequest, InvalidArgumentsException exception) throws IOException
InvalidArgumentsException.httpServletRequest - the requestexception - the exception.ErrorResponse.IOException - the IO exception@ExceptionHandler(value=LicenseKeyServiceException.class) public org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> handleServiceException(javax.servlet.http.HttpServletRequest httpServletRequest, LicenseKeyServiceException exception) throws IOException
LicenseKeyServiceException.httpServletRequest - the requestexception - the exception.ErrorResponse.IOException - the IO exception@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.httpServletRequest - the requestexception - the exception.ErrorResponse.IOException - the IO exception@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.httpServletRequest - the requestexception - the exception.ErrorResponse.IOException - the IO exceptionCopyright © 2020. All rights reserved.