@RequestMapping(produces="application/vnd.error+json") public class SpringControllerAdvice extends Object
| Constructor and Description |
|---|
SpringControllerAdvice() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<RestResponseErrorBody> |
defaultHandler(Exception e)
Handles any other unhandled exception as a last resort.
|
org.springframework.http.ResponseEntity<RestResponseErrorBody> |
handler(LockssRestServiceException lrse)
Handles a custom LOCKSS REST service exception.
|
@ExceptionHandler(value=LockssRestServiceException.class) public org.springframework.http.ResponseEntity<RestResponseErrorBody> handler(LockssRestServiceException lrse)
lrse - A LockssRestServiceException with the details of the problem.application/vnd.error+json.@ExceptionHandler(value=java.lang.Exception.class) public org.springframework.http.ResponseEntity<RestResponseErrorBody> defaultHandler(Exception e)
e - An Exception with the exception not handled by other exception
handler methods.application/vnd.error+json.Copyright © 2000–2020 LOCKSS Program. All rights reserved.