Example usage for org.springframework.orm.jpa JpaSystemException getMessage

List of usage examples for org.springframework.orm.jpa JpaSystemException getMessage

Introduction

In this page you can find the example usage for org.springframework.orm.jpa JpaSystemException getMessage.

Prototype

@Override
@Nullable
public String getMessage() 

Source Link

Document

Return the detail message, including the message from the nested exception if there is one.

Usage

From source file:edu.pitt.dbmi.ccd.anno.error.ErrorHandler.java

@ExceptionHandler(JpaSystemException.class)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ResponseBody/* ww  w  . j ava 2  s  .  c  o m*/
public ErrorMessage handleJpaSystemException(JpaSystemException ex, HttpServletRequest req) {
    LOGGER.error(ex.getMessage(), ex);
    return new ErrorMessage(HttpStatus.INTERNAL_SERVER_ERROR, REQUEST_FAILED, req);
}