protected WebServiceException(Response.Status status, String msg, Throwable cause) { super(msg, cause); response = Response.status(status) .entity(convertToErrorResponseMessage(msg)) .type(MediaType.APPLICATION_JSON_TYPE) .build(); }
@Override public Response toResponse(Throwable ex) { if (ex instanceof ProcessingException || ex instanceof IllegalArgumentException || ex instanceof NullPointerException) { return BadRequestException.of().getResponse(); } else if (ex instanceof WebServiceException) { return ((WebServiceException) ex).getResponse(); } logUnhandledException(ex); return new UnhandledServerException(ex.getMessage()).getResponse(); }
@Override public Response toResponse(Throwable ex) { if (ex instanceof ProcessingException) { return BadRequestException.of().getResponse(); } else if (ex instanceof WebServiceException) { return ((WebServiceException) ex).getResponse(); } logUnhandledException(ex); return new UnhandledServerException(ex.getMessage()).getResponse(); }
protected WebServiceException(Response.Status status, String msg) { super(msg); response = Response.status(status) .entity(convertToErrorResponseMessage(msg)) .type(MediaType.APPLICATION_JSON_TYPE) .build(); }
@Override public Response toResponse(Throwable ex) { if (ex instanceof ProcessingException || ex instanceof IllegalArgumentException || ex instanceof NullPointerException) { return BadRequestException.of().getResponse(); } else if (ex instanceof WebServiceException) { return ((WebServiceException) ex).getResponse(); } logUnhandledException(ex); return new UnhandledServerException(ex.getMessage()).getResponse(); }
protected WebServiceException(Response.Status status, String msg) { super(msg); response = Response.status(status) .entity(convertToErrorResponseMessage(msg)) .type(MediaType.APPLICATION_JSON_TYPE) .build(); }
protected WebServiceException(Response.Status status, String msg) { super(msg); response = Response.status(status) .entity(convertToErrorResponseMessage(msg)) .type(MediaType.APPLICATION_JSON_TYPE) .build(); }
protected WebServiceException(Response.Status status, String msg, Throwable cause) { super(msg, cause); response = Response.status(status) .entity(convertToErrorResponseMessage(msg)) .type(MediaType.APPLICATION_JSON_TYPE) .build(); }
protected WebServiceException(Response.Status status, String msg, Throwable cause) { super(msg, cause); response = Response.status(status) .entity(convertToErrorResponseMessage(msg)) .type(MediaType.APPLICATION_JSON_TYPE) .build(); }