List of usage examples for org.springframework.web HttpMediaTypeNotSupportedException getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:br.com.modoagil.asr.rest.support.RESTErrorHandler.java
/** * Manipula exceo para status HTTP {@code 415} * * @param ex/*from w ww . j a v a 2 s.c o m*/ * {@link HttpMediaTypeNotSupportedException} * @return resposta ao cliente */ @ResponseBody @ExceptionHandler(HttpMediaTypeNotSupportedException.class) public Response<E> processHttpMediaTypeNotSupportedException(final HttpMediaTypeNotSupportedException ex) { this.logger.info("handleHttpMediaTypeNotSupportedException - Catching: " + ex.getClass().getSimpleName(), ex); return new ResponseBuilder<E>().success(false).message(ex.getContentType().getType() + " not supported") .status(HttpStatus.UNSUPPORTED_MEDIA_TYPE).build(); }