Is there any way to get inside to the exception object when using annotation @ExceptionHandler?
this is my code:
@ExceptionHandler(DataInputException.class)
public ResponseEntity handleException(){
return ResponseEntity
.status(HttpStatus.BAD_REQUEST)
.body("Entity contains null or forbidden values");
}
I'd like to have returned message to contain customized info about perticular fields. (That's why I need error object).