portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl RenderingJob.java
Date Mon, 19 Jan 2004 22:00:26 GMT
weaver      2004/01/19 14:00:26

  Modified:    portal/src/java/org/apache/jetspeed/aggregator/impl
                        RenderingJob.java
  Log:
  RenderingJob will now attempt to write any stacktraces to the response
  
  Revision  Changes    Path
  1.3       +25 -4     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/RenderingJob.java
  
  Index: RenderingJob.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/RenderingJob.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RenderingJob.java	31 Dec 2003 09:46:35 -0000	1.2
  +++ RenderingJob.java	19 Jan 2004 22:00:26 -0000	1.3
  @@ -54,6 +54,8 @@
   
   package org.apache.jetspeed.aggregator.impl;
   
  +import java.io.IOException;
  +
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
   
  @@ -147,13 +149,32 @@
               log.debug("Rendering OID "+this.window.getId()+" "+ this.request +" "+this.response);
               container.renderPortlet(this.window, this.request, this.response);
               log.debug("Notifying dispatcher OID "+this.window.getId());
  -            this.response.flushBuffer();
  -            dispatcher.notify(this.window.getId());
  +          
           }
           catch (Throwable t)
           {
               // this will happen is request is prematurely aborted
  -            log.error("Error rendering portlet OID " + this.window.getId());
  +            log.error("Error rendering portlet OID " + this.window.getId(), t);
  +			try
  +            {
  +                t.printStackTrace(this.response.getWriter());
  +            }
  +            catch (IOException e)
  +            {
  +                // not important
  +            }
  +        }
  +        finally
  +        {
  +			try
  +            {            	
  +                this.response.flushBuffer();
  +                dispatcher.notify(this.window.getId());
  +            }
  +            catch (Exception e)
  +            {
  +                log.error("Error flushing response buffer: "+e.toString(), e);
  +            }
           }
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message