Why doesn't the Restlet framework make more use of exceptions? Why
should I have to do something like this:
if ( /* disaster */ ) {
response.setStatus( CLIENT_ERROR_WHATEVER, "message" );
return;
}
when I could do something like this:
if ( /* disaster */ )
throw new RestletException( CLIENT_ERROR_WHATEVER, "message" );
if RestletException existed? Why doesn't RestletException (or
something like it) exist?
If this existed, then the Message.getEntityAs*() methods could be
declared to throw it. As it is, getEntityAsSax() catches and
discards an IOException. That doesn't seem good.
- Paul