cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/servlet CocoonServlet.java
Date Sun, 16 Mar 2003 16:38:29 GMT
vgritsenko    2003/03/16 08:38:29

  Modified:    src/java/org/apache/cocoon/servlet CocoonServlet.java
  Log:
  zap tabs
  
  Revision  Changes    Path
  1.3       +35 -35    cocoon-2.1/src/java/org/apache/cocoon/servlet/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/servlet/CocoonServlet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CocoonServlet.java	16 Mar 2003 14:25:31 -0000	1.2
  +++ CocoonServlet.java	16 Mar 2003 16:38:29 -0000	1.3
  @@ -1162,40 +1162,40 @@
                   res.reset();
               }
   
  -			String type = Notifying.FATAL_NOTIFICATION;
  -			HashMap extraDescriptions = null;
  -			
  -			if (errorStatus == HttpServletResponse.SC_NOT_FOUND) {
  -				type = "resource-not-found";
  -				// Do not show the exception stacktrace for such common errors.
  -				e = null;
  -			} else {
  -				extraDescriptions = new HashMap(2);
  -				extraDescriptions.put(Notifying.EXTRA_REQUESTURI, req.getRequestURI());
  -				if (uri != null) {
  -					 extraDescriptions.put("Request URI", uri);
  -				}
  +            String type = Notifying.FATAL_NOTIFICATION;
  +            HashMap extraDescriptions = null;
  +            
  +            if (errorStatus == HttpServletResponse.SC_NOT_FOUND) {
  +                type = "resource-not-found";
  +                // Do not show the exception stacktrace for such common errors.
  +                e = null;
  +            } else {
  +                extraDescriptions = new HashMap(2);
  +                extraDescriptions.put(Notifying.EXTRA_REQUESTURI, req.getRequestURI());
  +                if (uri != null) {
  +                     extraDescriptions.put("Request URI", uri);
  +                }
   
  -				// Do not show exception stack trace when log level is WARN or above. Show only message.
  -				if (!log.isInfoEnabled()) {
  -					Throwable t = DefaultNotifyingBuilder.getRootCause(e);
  -					if (t != null) extraDescriptions.put(Notifying.EXTRA_CAUSE, t.getMessage());
  -					e = null;
  -				}
  -			}
  +                // Do not show exception stack trace when log level is WARN or above. Show
only message.
  +                if (!log.isInfoEnabled()) {
  +                    Throwable t = DefaultNotifyingBuilder.getRootCause(e);
  +                    if (t != null) extraDescriptions.put(Notifying.EXTRA_CAUSE, t.getMessage());
  +                    e = null;
  +                }
  +            }
   
  -			Notifying n = new DefaultNotifyingBuilder().build(this,
  -															   e,
  -															   type,
  -															   title,
  -															   "Cocoon Servlet",
  -															   message,
  -															   description,
  -															   extraDescriptions);
  -			
  -			res.setContentType("text/html");
  -			res.setStatus(errorStatus);
  -			Notifier.notify(n, res.getOutputStream(), "text/html");
  +            Notifying n = new DefaultNotifyingBuilder().build(this,
  +                                                              e,
  +                                                              type,
  +                                                              title,
  +                                                              "Cocoon Servlet",
  +                                                              message,
  +                                                              description,
  +                                                              extraDescriptions);
  +
  +            res.setContentType("text/html");
  +            res.setStatus(errorStatus);
  +            Notifier.notify(n, res.getOutputStream(), "text/html");
           } else {
               res.sendError(errorStatus, title);
               res.flushBuffer();
  
  
  

Mime
View raw message