Example usage for org.springframework.web.client HttpClientErrorException getClass

List of usage examples for org.springframework.web.client HttpClientErrorException getClass

Introduction

In this page you can find the example usage for org.springframework.web.client HttpClientErrorException getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:br.com.modoagil.asr.rest.support.RESTErrorHandler.java

/**
 * Manipula exceo para status HTTP {@code 4xx}, exceo do cliente
 *
 * @param ex/* ww w  .  ja  v  a 2s  .com*/
 *            {@link HttpClientErrorException}
 * @return resposta ao cliente
 */
@ResponseBody
@ExceptionHandler(HttpClientErrorException.class)
public Response<E> processHttpClientErrorException(final HttpClientErrorException ex) {
    this.logger.info("handleHttpClientErrorException - Catching: " + ex.getClass().getSimpleName(), ex);
    return new ResponseBuilder<E>().success(false).message(ex.getMessage()).status(ex.getStatusCode()).build();
}