|
Re: Why wrapped exceptions? [message #415820 is a reply to message #415812] |
Tue, 08 January 2008 13:54 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Jasper,
I assume the thinking was that they are much like SAXParseException
which require similar such handling; of course those are wrapped in yet
more layers. In the end, we need to make them all look like
IOExceptions and hence the wrapping. You might ask why not make them
IOExceptions, but I don't know the answer to that either...
Jasper wrote:
> What's the reason for wrapping checked exceptions such as
> PackageNotFoundException in an unchecked WrappedException? Why not
> just make PackageNotFoundException an unchecked exception?
>
> I ask because I find myself writing clumsy code unwrapping,
> inspecting, then rethrowing or handling depending on what was wrapped.
>
> Thanks,
> Jasper.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02929 seconds