classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] Patch: improve error handling in String


From: Anthony Green
Subject: Re: [cp-patches] Patch: improve error handling in String
Date: Thu, 15 Sep 2005 09:46:03 -0700

On Thu, 2005-09-15 at 09:50 -0600, Tom Tromey wrote:
> >>>>> "David" == David Daney <address@hidden> writes:
> 
> David> Anthony Green wrote:
> >> -    // XXX - Ignore coding exceptions? They shouldn't really happen.
> >> -    return null;
> >> +    // This shouldn't really happen.
> >> +    throw new Error(e);
> 
> David> Whould it be better to use InternalError?  That is a little
> David> more specific.
> 
> Yeah, I thought we had a rule about this, but I can't find it now.  I
> think InternalError makes sense here (and furthermore should be in
> hacking.texinfo).  Comments?

InternalError doesn't let you specify a "cause" Exception, which is
handy in this case.

AG






reply via email to

[Prev in Thread] Current Thread [Next in Thread]