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: Fri, 16 Sep 2005 09:02:53 -0700

On Fri, 2005-09-16 at 08:50 -0600, Tom Tromey wrote:
> >>>>> "Anthony" == Anthony Green <address@hidden> writes:
> 
> Anthony> Ok, how about this then....
> 
> This patch is going to be nit-picked to death :-)
> 
> Anthony> +    // This shouldn't really happen.
> Anthony> +        InternalError ie = new InternalError();
> Anthony> +    ie.initCause(e);
> Anthony> +    throw ie;
> 
> How about a message in the error?  With that change it is fine.
> Thanks.

We discussed on IRC.  I committed this patch without a message, but
collapsed into one line like so:

  // This shouldn't ever happen.
  throw (InternalError) new InternalError().initCause(e);

After all this discussion I kind of hope this exception _is_ thrown some
day :-)

AG






reply via email to

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