cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java Utils.java
Date Thu, 27 Jan 2000 11:50:14 GMT
stefano     00/01/27 03:50:13

  Modified:    src/org/apache/cocoon Cocoon.java Utils.java
  Log:
  cosmetics
  
  Revision  Changes    Path
  1.11      +4 -4      xml-cocoon/src/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Cocoon.java	2000/01/27 04:03:21	1.10
  +++ Cocoon.java	2000/01/27 11:50:12	1.11
  @@ -1,4 +1,4 @@
  -/*-- $Id: Cocoon.java,v 1.10 2000/01/27 04:03:21 balld Exp $ -- 
  +/*-- $Id: Cocoon.java,v 1.11 2000/01/27 11:50:12 stefano Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -64,7 +64,7 @@
    * separate different knowledge contexts in different processing layers.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.10 $ $Date: 2000/01/27 04:03:21 $
  + * @version $Revision: 1.11 $ $Date: 2000/01/27 11:50:12 $
    */
   
   public class Cocoon extends HttpServlet implements Defaults {
  @@ -147,13 +147,13 @@
                       if (errorsInternally) {
                           Frontend.error(response, "File not found.", e);
                       } else {
  -                        response.sendError(404,Utils.getStackTraceAsString(e));
  +                        response.sendError(404, Utils.getStackTraceAsString(e));
                       }
                   } catch (Throwable t) {
                       if (errorsInternally) {
                           Frontend.error(response, "Error found handling the request.", t);
                       } else {
  -                        response.sendError(500,Utils.getStackTraceAsString(t));
  +                        response.sendError(500, Utils.getStackTraceAsString(t));
                       }
                   }
               }
  
  
  
  1.8       +11 -12    xml-cocoon/src/org/apache/cocoon/Utils.java
  
  Index: Utils.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Utils.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Utils.java	2000/01/27 04:03:21	1.7
  +++ Utils.java	2000/01/27 11:50:12	1.8
  @@ -1,4 +1,4 @@
  -/*-- $Id: Utils.java,v 1.7 2000/01/27 04:03:21 balld Exp $ -- 
  +/*-- $Id: Utils.java,v 1.8 2000/01/27 11:50:12 stefano Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -61,7 +61,7 @@
    * Utility methods for Cocoon and its classes.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.7 $ $Date: 2000/01/27 04:03:21 $
  + * @version $Revision: 1.8 $ $Date: 2000/01/27 11:50:12 $
    */
   
   public final class Utils {
  @@ -252,14 +252,13 @@
           }
       }
   
  -	/**
  -	 * Returns the stack trace as a string
  -	 */
  -	public static final String getStackTraceAsString(Throwable e) {
  -		CharArrayWriter chars = new CharArrayWriter();
  -		PrintWriter writer = new PrintWriter(chars,true);
  -		e.printStackTrace(writer);
  -		return chars.toString();
  -	}
  -
  +    /*
  +     * Returns the stack trace as a string
  +     */
  +    public static final String getStackTraceAsString(Throwable e) {
  +        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
  +        PrintWriter writer = new PrintWriter(bytes, true);
  +        e.printStackTrace(writer);
  +        return bytes.toString();
  +    }
   }
  
  
  

Mime
View raw message