You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adam Heath <do...@brainfood.com> on 2010/02/28 04:33:53 UTC
org.ofbiz.base.* Debug.logError bad usage(s)
There are *tons* of places in base that call Debug.logError, either
with or without an exception, then immediately throw their own
exception back to their callers.
Debug.logError should *not* be called, if the error is being reported
back to the caller in some other manner. This is a cause of major
exception duplications in the log.
Should we go about fixing these?
The first one I happened to check, was in BshUtil; it catches
EvalError, logs it, then immediately rethrows it.
I'm not suggesting we modify the api to add a bunch of throws clauses;
but if an exception is already going to be thrown, then there is no
need to log it.
Re: org.ofbiz.base.* Debug.logError bad usage(s)
Posted by Jacques Le Roux <ja...@les7arts.com>.
From: "Adam Heath" <do...@brainfood.com>
> There are *tons* of places in base that call Debug.logError, either
> with or without an exception, then immediately throw their own
> exception back to their callers.
>
> Debug.logError should *not* be called, if the error is being reported
> back to the caller in some other manner. This is a cause of major
> exception duplications in the log.
>
> Should we go about fixing these?
I did not look into details, but all that would reduce duplication in log without changing any other behaviors would be a very good
thing IMO
Jacques
> The first one I happened to check, was in BshUtil; it catches
> EvalError, logs it, then immediately rethrows it.
>
> I'm not suggesting we modify the api to add a bunch of throws clauses;
> but if an exception is already going to be thrown, then there is no
> need to log it.
>