You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by je...@apache.org on 2003/09/06 09:43:05 UTC

cvs commit: xml-forrest/src/resources/forrestbot/webapp tail_refreshlog.jsp

jefft       2003/09/06 00:43:05

  Modified:    src/resources/forrestbot/webapp tail_refreshlog.jsp
  Log:
  Catch and display errors (most recently, OutOfMemoryErrors)
  
  Revision  Changes    Path
  1.3       +4 -2      xml-forrest/src/resources/forrestbot/webapp/tail_refreshlog.jsp
  
  Index: tail_refreshlog.jsp
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/webapp/tail_refreshlog.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- tail_refreshlog.jsp	28 Jan 2003 10:29:04 -0000	1.2
  +++ tail_refreshlog.jsp	6 Sep 2003 07:43:05 -0000	1.3
  @@ -8,9 +8,11 @@
   <%
   File f = new File(getServletContext().getRealPath(LOG_FILE));
   if (f.exists()) {
  -	String logs = forrestbot.IOUtil.toString(new FileReader(f));
  +try {
  +  String logs = forrestbot.IOUtil.toString(new FileReader(f));
     int len = logs.length();
  -	out.println( ((len < TAIL_SIZE) ? logs : logs.substring(logs.length()-TAIL_SIZE)) );
  +  out.println( ((len < TAIL_SIZE) ? logs : logs.substring(logs.length()-TAIL_SIZE)) );
  +  } catch (Throwable t) { out.println(t); }
   } else { %>
   
   Log file <%=LOG_FILE%> not found.