commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
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 21:35:53 GMT
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/foundry/throwables/ThrowableChai
> 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>


Mime
View raw message