users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Concerns about the client-side exception hierarchy

From: Bill Burke <bburke_at_redhat.com>
Date: Thu, 26 Jan 2012 10:13:57 -0500

On 1/26/12 9:38 AM, Santiago Pericas-Geertsen wrote:
> Sergey,
>
> I think this is worth exploring. Can you turn this into a JIRA?
>

+1.

Also, I think we need a richer exception hierarchy than Sergey suggests.
  These would be especially useful when people call methods like

<T> T get(String.class);

i.e.

MethodNotAllowedException
BadRequestException
NotAcceptableException
InternalServerErrorException
UnauthorizedException
UnsupportedMediaTypeException
NotFoundException


Finally, these above exceptions would be useful on the server side.
*NOT* for application code to catch, but rather to write
ExceptionMappers for. So, Jersey/Resteasy whoever would throw those
exceptions internally, and applications could write ExceptionMapper for
those exceptions.

Resteasy implemented these features on client/server after suggestions
from users.

I'll open a JIRA if we get some agreement on this.

Bill
-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com