@ControllerAdvice public class ExceptionRestHandler extends Object
IntegrationException
Constructor and Description |
---|
ExceptionRestHandler() |
Modifier and Type | Method and Description |
---|---|
protected org.springframework.http.HttpStatus |
getStatusFromException(Exception exception)
Resolve
HttpStatus from exception. |
org.springframework.http.ResponseEntity<GeneralFaultRpc> |
onException(javax.servlet.http.HttpServletRequest req,
Exception ex)
Handle common Java exception (=raw error).
|
org.springframework.http.ResponseEntity<GeneralFaultRpc> |
onIntegrationException(javax.servlet.http.HttpServletRequest req,
IntegrationException ex)
Handle
IntegrationException . |
org.springframework.http.ResponseEntity<ValidationFaultRpc> |
onValidationException(javax.servlet.http.HttpServletRequest req,
ValidationException ex)
Handle
ValidationException . |
@ExceptionHandler(value=ValidationException.class) public org.springframework.http.ResponseEntity<ValidationFaultRpc> onValidationException(javax.servlet.http.HttpServletRequest req, ValidationException ex)
ValidationException
.protected org.springframework.http.HttpStatus getStatusFromException(Exception exception)
HttpStatus
from exception.
Exception is taken from ResponseStatus.value()
. If is not found, return HttpStatus.BAD_REQUEST
.exception
- exception from which we get HttpStatus
@ExceptionHandler(value=IntegrationException.class) public org.springframework.http.ResponseEntity<GeneralFaultRpc> onIntegrationException(javax.servlet.http.HttpServletRequest req, IntegrationException ex)
IntegrationException
.@ExceptionHandler(value=java.lang.Exception.class) public org.springframework.http.ResponseEntity<GeneralFaultRpc> onException(javax.servlet.http.HttpServletRequest req, Exception ex)
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.