Example usage for org.springframework.data.rest.webmvc.support ExceptionMessage ExceptionMessage

List of usage examples for org.springframework.data.rest.webmvc.support ExceptionMessage ExceptionMessage

Introduction

In this page you can find the example usage for org.springframework.data.rest.webmvc.support ExceptionMessage ExceptionMessage.

Prototype

public ExceptionMessage(Throwable throwable) 

Source Link

Usage

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);
    }
}