[jbosscache-dev] Logging exceptions

Vladimir Blagojevic vladimir.blagojevic at jboss.com
Thu Dec 21 13:06:35 EST 2006


Hi,

Sometimes I come across a case where a good design principle for a flow
of control is to raise an exception. Exceptions are usually logged and
stack trace is dumped. In some of these cases exceptions happen due to
expected circumstances (i.e request to activate region when region is
not active) and so on. I am getting an impression (maybe a false one)
that users freak out when the see stack traces and thus I am reluctant
to raise an Exception in some of these cases and make a workaround.

What do you guys do about this problem? Is there a way to have a generic
catch clause for Exception but somehow indicate if stacktrace should be
dumped or not to a logger? Or should I just forget about this impression
(of freaking out users) and raise exceptions whenever a good design
dictates it?

Regards,
Vladimir




More information about the jbosscache-dev mailing list