jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: String message in our exceptions

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Fri, 25 Jan 2013 15:24:45 +0000

On 25/01/13 15:22, Sergey Beryozkin wrote:
> On 25/01/13 14:53, Bill Burke wrote:
>> I've been finding I've been doing this a lot because the JAX-RS
>> exception classes don't allow you to set a message:
>>
>> new BadRequestException(new Exception("You did something really bad"));
>>
>> Can we add String parameter options to the exception hierarchy?
> +1
By the way, I'd still consider making sure well known API exceptions
like BadRequestException report an actual message if any from
toMessage() on the client side, or may be a dedicated method can be
added at WebApplicationException level

Cheers

>
> Sergey