@Provider public class ResteasyViolationExceptionMapper extends Object implements ExceptionMapper<ValidationException>
Constructor and Description |
---|
ResteasyViolationExceptionMapper() |
Modifier and Type | Method and Description |
---|---|
protected Response |
buildResponse(Object entity,
String mediaType,
Response.Status status) |
protected Response |
buildViolationReportResponse(ResteasyViolationException exception,
Response.Status status) |
Response |
toResponse(ValidationException exception)
Map an exception to a
Response . |
protected String |
unwrapException(Throwable t) |
public Response toResponse(ValidationException exception)
ExceptionMapper
Response
. Returning
null
results in a Response.Status.NO_CONTENT
response. Throwing a runtime exception results in a
Response.Status.INTERNAL_SERVER_ERROR
response.toResponse
in interface ExceptionMapper<ValidationException>
exception
- the exception to map to a response.protected Response buildResponse(Object entity, String mediaType, Response.Status status)
protected Response buildViolationReportResponse(ResteasyViolationException exception, Response.Status status)
Copyright © 2019 JBoss by Red Hat. All rights reserved.