org.jboss.resteasy.client.exception.ResteasyInternalServerErrorException Maven / Gradle / Ivy
package org.jboss.resteasy.client.exception;
import static org.jboss.resteasy.client.exception.WebApplicationExceptionWrapper.sanitize;
import javax.ws.rs.InternalServerErrorException;
import javax.ws.rs.core.Response;
/**
* Wraps a {@link InternalServerErrorException} with a {@linkplain #sanitize(Response) sanitized} response.
*
* @author James R. Perkins
*/
public class ResteasyInternalServerErrorException extends InternalServerErrorException implements WebApplicationExceptionWrapper {
private final InternalServerErrorException wrapped;
ResteasyInternalServerErrorException(final InternalServerErrorException wrapped) {
super(wrapped.getMessage(), sanitize(wrapped.getResponse()), wrapped.getCause());
this.wrapped = wrapped;
}
@Override
public InternalServerErrorException unwrap() {
return wrapped;
}
}