commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Caswell" <ste...@caswell.name>
Subject RE: [lang] patch to Nestable interface, exception implementation classes, and test cases to get message specific to the nestable
Date Mon, 08 Jul 2002 23:33:53 GMT
Sounds like a good approach. Is there a preference to returning a String
array vs. a List? I vote for a String array but I don't feel too
strongly either way.


Steven Caswell
steven@caswell.name
a.k.a Mungo Knotwise of Michel Delving
"One ring to rule them all, one ring to find them..."


> -----Original Message-----
> From: Stephen Colebourne [mailto:scolebourne@btopenworld.com] 
> Sent: Monday, July 08, 2002 4:36 PM
> To: Jakarta Commons Developers List; ljnelson94@alumni.amherst.edu
> Subject: Re: [lang] patch to Nestable interface, exception 
> implementation classes, and test cases to get message 
> specific to the nestable
> 
> 
> I favour this approach of having an accessible list rather 
> than fixed access. If we are to do this I would like the 
> change to be made now. It would involve replacing the 
> recently added getNextMessage() method with the more generic 
> getMessages() that returns a List of Strings (or a string 
> array). getFirst and getLast message could stay. Opinions?
> 
> Stephen
> 
> ----- Original Message -----
> From: "Laird J. Nelson" <lairdnelson@earthlink.net>
> > > From: Henri Yandell [mailto:bayard@generationjava.com]
> > > > > From: Steven Caswell [mailto:steven@caswell.name]
> > > > > > From: Henri Yandell [mailto:bayard@generationjava.com]
> > > > > > I may be misunderstanding, but getBaseMessage returns the 
> > > > > > message at the top level of the Exception, ie) the 
> most recent 
> > > > > > message.
> > > > > Correct
> > > > > > Should we also have:
> > > > > > getNestedMessage() which returns the Exception at the next 
> > > > > > level down, and
> > > > > > getDeepNestedMessage() which returns the Exception at the 
> > > > > > bottom, assuming all Exceptions in the chain implement 
> > > > > > Nestable?
> > Another approach to take might be to treat composite 
> exceptions like 
> > this like a linked list.  I've done something similar with my own 
> > ThrowableChain class (javadocs available at 
> > 
> http://foundry.sourceforge.net/docs/api/foundr>
y/throwables/ThrowableCh
> > ai
> > n.html).  I've found that being able to get the length of 
> the chain, get
> > the "ith" exception in the chain, etc. is really helpful, especially
> > when determining the message to show to the end user.
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:commons-dev-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <mailto:commons-dev-help@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message