Hi,
I have several classes which I use as query parameters (that have a constructor with the single String argument). When parsing the string I also perform transformations/validations which can result in an exception being thrown. I would like for the exception mapper I created for those exception to handle them, whoever it seems that when creating a query parameter object jersey wraps any exception in a ExtractorException which is itself wrapped in a ParamException.QueryParamException.
My question is, is there a way to disable this wrapping behaviour? (behaviour like this seems counter-intuitive to the basic utility of exception mappers which is: create exception + exception mapper as a standard for error handling - is there any special reason why the exception are wrapped in ParamException.QueryParamException?)
Right now I've created an exception mapper for ParamException.QueryParamException and depending on the cause I return different responses, but it would be "cleaner" if I were able to disable the wrapping...
Cheers,
Pedro S.