cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: cvs commit: xml-cocoon2/src/java/org/apache/cocoon Cocoon.java
Date Wed, 11 Sep 2002 13:35:15 GMT
cziegeler@apache.org wrote:

>cziegeler    2002/09/11 03:08:36
>  
>
<snip/>

>  Index: ActionSetNodeBuilder.java
>  ===================================================================
>  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ActionSetNodeBuilder.java,v
>  retrieving revision 1.3
>  retrieving revision 1.4
>  diff -u -r1.3 -r1.4
>  --- ActionSetNodeBuilder.java	24 Jun 2002 20:32:19 -0000	1.3
>  +++ ActionSetNodeBuilder.java	11 Sep 2002 10:08:33 -0000	1.4
>  @@ -101,7 +101,6 @@
>               } else {
>                   // Unknown element
>                   String msg = "Unknown element " + name + " in action-set at " + childConfig.getLocation();
>  -                getLogger().error(msg);
>                   throw new ConfigurationException(msg);
>               }
>           }
>  
>

<snip/>

I'm a little bit disappointed by this update. Because of lack of time, I 
didn't participate to the "Make errors caught only by Cocoon.java" 
discussion, and I agree that _exceptions_ should be logged only once.

Now the above change removes the log of a _message_ and not that of an 
_exception_. I explained in
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=100884840411961&w=2 why 
I think logging a message when an exception is _thrown_ (and not 
catched) is good :
- the message is logged into the component's category,
- the context may contain additional information placed there by the 
callers.

Also, I don't consider this as over-logging :
- a _message_ is logged when the error condition is encountered (and the 
exception thrown)
- the _exception_ is logged when some high-level class (here Cocoon) 
catches the exception and cannot take a corrective action when receiving 
that exception.

Thoughts ?

Sylvain
(of course, I volunteer for undoing the change if we agree on that...)

-- 
Sylvain Wallez
  Anyware Technologies                  Apache Cocoon
  http://www.anyware-tech.com           mailto:sylvain@apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message