commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nelson, Laird" <Laird.Nel...@FMR.COM>
Subject RE: [Lang] Generic interface for handling exceptions
Date Wed, 31 Jul 2002 12:29:51 GMT
> -----Original Message-----
> From: Henri Yandell [mailto:bayard@generationjava.com]
> My immediate thoughts are that it doesn't really add any
> functionality to Lang, just a standardised interface.

How about just putting it in lang/exception?

> As far as users are concerned, I would normally expect to use Log4J or
> something in this kind of area.

But logging is just one instance of event handling (i.e. you handle a
"throwable event" typically by logging it, but you needn't).  I'd rather
have my objects be decoupled entirely (or as close to entirely as possible)
from *any* logging system, and simply fire events (such as this) instead.

> Maybe it's a feature which could be added to commons-logging?

Well, except logging is Something You Do In Response To An Event.  In
itself, the catching of a Throwable is not tightly bound to logging (maybe I
want to use this mechanism to somehow signal for a retry, or something like
that).

> The bottom line being, standardised interfaces in Commons Lang make me
> uncomfortable. There are so many we can add, and I feel the strength 
> of Lang is in immediate usage of code in any Java project.

I'd follow the JDK's lead in this case.  There are some interfaces that are
just so compelling and universal, like Comparable, that they belong at the
fundamental level (like lang/exception or something like that).

Cheers,
Laird

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