Example usage for org.springframework.http.converter HttpMessageNotReadableException printStackTrace

List of usage examples for org.springframework.http.converter HttpMessageNotReadableException printStackTrace

Introduction

In this page you can find the example usage for org.springframework.http.converter HttpMessageNotReadableException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:cn.org.once.cstack.config.RestHandlerException.java

@Override
protected ResponseEntity<Object> handleHttpMessageNotReadable(HttpMessageNotReadableException ex,
        HttpHeaders headers, HttpStatus status, WebRequest request) {
    ex.printStackTrace();
    headers = new HttpHeaders();
    headers.setContentType(MediaType.APPLICATION_JSON);
    return handleExceptionInternal(ex, new HttpErrorServer(ex.getLocalizedMessage()), headers,
            HttpStatus.BAD_REQUEST, request);
}