cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: I know why cocoon hides the error position
Date Wed, 07 Feb 2001 13:39:02 GMT
Joerg Anders <j.anders@informatik.tu-chemnitz.de> 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 
http://xml.apache.org/cocoon/installing.html

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 http://www.hotmail.com.


Mime
View raw message