cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Anders <j.and...@informatik.tu-chemnitz.de>
Subject I know why cocoon hides the error position
Date Wed, 07 Feb 2001 09:23:55 GMT
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)



Mime
View raw message