List of usage examples for org.springframework.data.rest.webmvc.support ExceptionMessage ExceptionMessage
public ExceptionMessage(Throwable throwable)
From source file:org.agatom.springatom.web.controller.SVDefaultController.java
protected <T extends Throwable> ResponseEntity<ExceptionMessage> errorResponse(final HttpHeaders headers, final T throwable, final HttpStatus status) { if (null != throwable && null != throwable.getMessage()) { logger.error("errorResponse(err={})", throwable.getMessage()); return this.response(headers, new ExceptionMessage(throwable), status); } else {//from w w w.j av a2 s.c o m return this.response(headers, null, status); } }