cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <>
Subject Re: I know why cocoon hides the error position
Date Wed, 07 Feb 2001 13:39:02 GMT
Joerg Anders <> wrote:
>Could somebody please insert the following lines into method
>     Frontend.error(ServletResponse response, String message, Throwable t)
>       public static void error(ServletResponse response, String message, 
>Throwable t) throws IOException {
>-->        StringWriter buffer = new StringWriter();
>-->        if (t != null) {
>-->          PrintWriter pw = new PrintWriter(buffer);
>-->          pw.println("1: " + t.getMessage());
>-->          t.printStackTrace(pw);
>-->        }
>            print(response, message, buffer.toString() + "2");
>        }
>This causes Cocooon to print the line, column and filename of the
>error position. Otherwise the "print" message only shows the
>position where the XMLParser was as it detected the error.
>This information is totally useless!

This problem has already been fixed. It took me a lot of head-scratching. 
The root cause of the bug is actually in SAX error printing (Dave Megginson 
has confirmed). For now sax-bugfix.jar in Cocoon 1.8.2 will fix it. See

It pays to look at the latest version carefully (e.g. the Changes page in 
the documentation), before spending time trying to fix a bug which has 
ALREADY been fixed!

Get Your Private, Free E-mail from MSN Hotmail at

View raw message