cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject [C1] Better error reporting for namespace logicsheets
Date Tue, 25 Jul 2000 16:09:43 GMT
At the moment, in C1 if there is an error in a logicsheet referenced by a 
namespace declaration in xsp:page, then all you get is a 
NullPointerException, and nothing in the servlet logs (unless your log level 
in cocoon.properties is set to debug or "lower"). This is really bad for 
debugging - it has caught me out quite a few times.

There are at least two problems here:

(1) There _is_ an error logged but only as a "Logger.WARNING". I think it 
should definitely by an ERROR, and someone else (Stefano) has suggested this 
as well:

        // should we consider this fatal and throw an exception? (SM)
        logger.log(this, "Logicsheet for namespace '" +
                   namespace + "' not found at '" +
                   location +
                   "' due to " +
                   ex,
                   Logger.WARNING);
      }

(2) A null entry is put in the logicsheet map so you only get a 
NullPointerException when an XSP page is requested. Not very helpful.

(3) Could the exception in XSPProcessor initialization work like a failure 
to load cocoon.properties does now, so it would store the exception until a 
page was requested, and then throw it, so you find out as soon as possible? 
I haven't looked into how this could be done.

But even if we don't fix (2) or (3) for v1.8 please could someone change it 
from Logger.WARNING to Logger.ERROR? Thanks!


--
Robin Green
i-tao Ltd.
4 Skyline Village
Limeharbour
London E14 9TS
United Kingdom
Phone +44 20 7537 2233  Fax +44 70 8081 5118
http://www.i-tao.com


________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Mime
View raw message