@Provider public class RuntimeExceptionMapper extends Object implements javax.ws.rs.ext.ExceptionMapper<RuntimeException>
From http://gary-rowe.com/agilestack/2012/10/23/how-to-implement-a-runtimeexceptionmapper-for-dropwizard/
Provider to provide the following to Jersey framework:
The RuntimeExceptionMapper has a DEFAULT_SHOW_DETAILS set to false because it's questionable security to emit stack traces from a REST API and it makes upgrading and testing the exception mapper hard because comparing against stack trace Strings for equality or near-equality is pretty lame
| Constructor and Description |
|---|
RuntimeExceptionMapper() |
RuntimeExceptionMapper(boolean showDetails,
javax.ws.rs.core.MediaType mediaType) |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
toResponse(RuntimeException exception) |
public RuntimeExceptionMapper()
public RuntimeExceptionMapper(boolean showDetails,
javax.ws.rs.core.MediaType mediaType)
public javax.ws.rs.core.Response toResponse(RuntimeException exception)
toResponse in interface javax.ws.rs.ext.ExceptionMapper<RuntimeException>Copyright © 2016. All rights reserved.