cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/servlet CocoonServlet.java
Date Sun, 27 Feb 2000 17:48:51 GMT
pier        00/02/27 09:48:51

  Modified:    src/org/apache/cocoon/servlet Tag: xml-cocoon2
                        CocoonServlet.java
  Log:
  [Cocoon 2.0] Servlet exception reporting bugfix.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.7   +9 -8      xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServlet.java,v
  retrieving revision 1.1.4.6
  retrieving revision 1.1.4.7
  diff -u -r1.1.4.6 -r1.1.4.7
  --- CocoonServlet.java	2000/02/27 14:58:16	1.1.4.6
  +++ CocoonServlet.java	2000/02/27 17:48:50	1.1.4.7
  @@ -28,7 +28,7 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
  - * @version CVS $Revision: 1.1.4.6 $ $Date: 2000/02/27 14:58:16 $
  + * @version CVS $Revision: 1.1.4.7 $ $Date: 2000/02/27 17:48:50 $
    */
   public class CocoonServlet extends HttpServlet {
       private Cocoon cocoon=null;
  @@ -133,7 +133,7 @@
               out.println("<hr></body></html>");
               }
           } catch (Exception e) {
  -            res.setStatus(res.SC_INTERNAL_SERVER_ERROR);
  +            //res.setStatus(res.SC_INTERNAL_SERVER_ERROR);
               res.setContentType("text/html");
               out.println("<html><head>");
               out.println("<title>Cocoon Version 2.0: Exception</title>");
  @@ -141,15 +141,16 @@
               out.println("<center><h1>Cocoon 2.0: Exception</h1></center>");
               out.println("<hr>");
               this.printException(out,e);
  -            if (exception instanceof SAXException) {
  -                Exception nested=((SAXException)this.exception).getException();
  +            if (e instanceof SAXException) {
                   out.println("<hr>");
  +                out.println("SAX processing exception<br>");
  +                Exception nested=((SAXException)e).getException();
                   this.printException(out,nested);
  -            } else if (exception instanceof ComponentNotAccessibleException) {
  +            } else if (e instanceof ComponentNotAccessibleException) {
  +                out.println("<hr>");
                   out.println("Component not accessible<br>");
  -                Exception nested=this.exception;
  +                Exception nested=e;
                   nested=((ComponentNotAccessibleException)nested).getException();
  -                out.println("<hr>");
                   this.printException(out,nested);
               }
               out.println("<hr></body></html>");
  @@ -185,7 +186,7 @@
       /** Dump an exception to the specified <code>ServletOutputStream</code>
*/
       private void printException(ServletOutputStream o, Exception e) {
           PrintWriter out=new PrintWriter(o);
  -        out.println("<b>"+e.getClass().getName()+"</b><br>");
  +        out.println("Class: <b>"+e.getClass().getName()+"</b><br>");
           out.println("Message: <i>"+e.getMessage()+"</i><br>");
           out.println("<pre>");
           e.printStackTrace(out);
  
  
  

Mime
View raw message