On Dec 5, 2007, at 9:14 AM, Paul J. Lucas wrote:
On Dec 4, 2007, at 3:03 AM, Stian Soiland wrote:
On 12/3/07, Paul J. Lucas <[EMAIL PROTECTED]> wrote:
Funny, because java.io.FileNotFoundException is derived from
IOException. So clearly there's precedent.
Did you notice the "io" package name? :-) The exceptions here are
about resources, not IO.
So what? java.io.IOException means *any* exception with *any* I/O,
be it file, socket, keyboard, courier pigeon, whatever.
If RestletException were to exist, then *any* exception with *any*
resource, be it a file on a local disk, or some other abstract
resource, would be appropriate. Would calling it ResourceException
make it make more sense to you?
I forgot to add the bit required for the mental leap: since some of
the things you do with resources is serve them to the client (via
GET), get new ones from the client (via POST), or update them (via
PUT), then those -- almost always -- involve I/O of some kind.
Therefore, it's not unreasonable to derive RestletException from
IOException.
- Paul