You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Joerg Anders <j....@informatik.tu-chemnitz.de> on 2001/02/07 10:23:55 UTC

I know why cocoon hides the error position

Hi!

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!

Please note! A lot of efford is made in 

   org.apache.cocoon.parser.AbstractParser.error(SAXParseException e)

to add the exact error position and the filename into the SAXException.
But nobody prints it ???


J.Anders, Chemnitz, GERMANY (ja@informatik.tu-chemnitz.de)