On Dec 2, 2007, at 11:50 AM, Toby Thain wrote:

On 29-Nov-07, at 3:06 PM, Paul J. Lucas wrote:

On Nov 28, 2007, at 11:31 PM, Sumit Lohia wrote:

Also I can code against interfaces that know nothing about Restlets so don't have to add 'throws RestletException' even though the implementation might
throw a derived exception like NotFoundException.

RestletException could conceivably be derived from IOException. An interface that didn't anticipate that an implementation might need to do some kind of I/O as part of said implementation wasn't designed with sufficient foresight, IMHO.

Maybe I misunderstood... But surely you can't mean an exception with semantics such as 'http resource not found' (or forbidden, etc) - because those are not i/o related but resource related.

Funny, because java.io.FileNotFoundException is derived from IOException. So clearly there's precedent.

What kind of thing would a RestletException subclassed from IOException be used for?

The same things as if it weren't derived from IOException that have already been mentioned. However, if it is derived from IOException, it will integrate better with existing APIs.

- Paul

Reply via email to