@ControllerAdvice public class RestExceptionHandler extends Object
RestException errors. Should be
implemented as ControllerAdvice.| Constructor and Description |
|---|
RestExceptionHandler() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<RestError> |
handleRestException(RestException ex,
org.springframework.web.context.request.WebRequest request)
Catches a
RestException thrown bt a web service
controller and returns an informative message. |
@ExceptionHandler(value=RestException.class) public org.springframework.http.ResponseEntity<RestError> handleRestException(RestException ex, org.springframework.web.context.request.WebRequest request)
RestException thrown bt a web service
controller and returns an informative message.ex - RestExceptionrequest - WebRequestRestErrorCopyright © 2016. All rights reserved.