Patch: merge File.toURI() from Classpath

C. Brian Jones cbj@gnu.org
Tue Jul 6 22:39:00 GMT 2004


On Tue, 2004-07-06 at 12:22, David Daney wrote:

> 
> If don't like the idiom new InternalError().initCause(), then add a
> constructor to InternalError (and perhaps Error also) so that you can
> pass the cause as a constructor parameter.

As pointed out, Classpath does not add to the published, public, API of
the core classes intentionally for compatibility.  I too think
RuntimeException would be incorrect in these situations, clearly an
error should be thrown instead that indicates the dire situation the
runtime is now in and the need to fix a potential library bug.  The use
of initCause() would seem appropriate if a cause exists.  

While applications can recover from many forms (maybe all)
RuntimeExceptions, it is probably impossible to recover from
InternalErrors.

Thanks,
Brian
-- 
Brian Jones <cbj@gnu.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040706/70375c0b/attachment.sig>


More information about the Java-patches mailing list