commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <...@finemaltcoding.com>
Subject Re: DBCP/LANG
Date Tue, 13 Aug 2002 19:52:57 GMT
costinm@covalent.net writes:

> On 13 Aug 2002, Daniel Rall wrote:
> 
> > I agree, and have implemented such a class (with unit tests) and
> > committed it to the exception package of [lang].  I added two methods,
> > one to get the immediate cause, and another to ferret out the root
> > cause (after walking the exception tree).  Costin, Henri, when you
> > have a moment, any review would be appreciated.
> 
> Great !
> 
> > Note that I didn't implement RMI's "detail" instance attribute,
> > partially because I think it's a poor pattern, and partially because
> > I'm not a big fan of RMI (I prefer a SPOF-less MOM approach).
> 
> Is this a joke ? 
> Maybe you want to do a getClass().getName() and filter out 
> other technologies/APIs you don't like :-) 

It's not a joke, it's a "here's a morning hack which is missing this
less important piece of what you proposed" comment.  Even the original
version notes this as a TODO, but since you indicated that this was a
pattern used in only 1% of cases, I didn't implement it for the first
cut.  :-)

> > Another benefit includes stack trace joining (i.e. trace of the casual
> > exception is appended to the trace of the primary exception).  This
> > functionality might be useful to refactor into the new ExceptionUtils
> > class.
> 
> +1
> 
> Another interesting issue is parsing the line numbers out of the
> stack trace.

There is code in NestableDelegate's decompose() method which parses
call stack frames.  Getting the line numbers out of those frames
shouldn't be too hard.  What sort of use cases do you see for this?

> And probably a more specialised one, for applications using code 
> generation - find the line in the 'original' file, using the 
> stack trace and a mapping table. That's done in jasper- and 
> quite complex, probably it's better to leave it there or wait
> for the new 'debugging for foreign languages' impl.

Is the 'debugging for foreign languages' a JDK or Jasper feature?
This sounds like something that might not be general enough for
ExceptionUtils, but is cool never the less.
-- 

Daniel Rall <dlr@finemaltcoding.com>

--
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