You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Wendy Smoak <We...@asu.edu> on 2004/02/20 17:51:31 UTC

Tomcat and checked vs. unchecked exceptions

This got no play on comp.lang.java.programmers, and while I don't think
it's Tomcat specific, I'm at a loss as to how to present a nice error
page when this happens.  Help?

Can someone possibly shed some light on this?  I have a Servlet that
keeps
coming up with:

ExceptionConverter: java.io.IOException: The document has no pages.
at com.lowagie.text.pdf.PdfPages.writePageTree(Unknown Source)
at com.lowagie.text.pdf.PdfWriter.close(Unknown Source)
at com.lowagie.text.pdf.PdfDocument.close(Unknown Source)
at com.lowagie.text.Document.close(Unknown Source)

The ExceptionConverter is:
http://itext.sourceforge.net/docs/com/lowagie/text/ExceptionConverter.ht
ml

Apparently it changes a checked exception into an unchecked one. I'm not
sure what that means to me, except that try as I might, I can't catch
this
in Tomcat and present a nice error page:

   <error-page>
      <exception-type>javax.servlet.ServletException</exception-type>
      <location>/exceptions/Exception.jsp</location>
   </error-page>
   <error-page>
      <exception-type>java.io.IOException</exception-type>
      <location>/exceptions/Exception.jsp</location>
   </error-page>
   <error-page>
 
<exception-type>com.lowagie.text.ExceptionConverter</exception-type>
      <location>/exceptions/Exception.jsp</location>
   </error-page>

-- 
Wendy in Chandler, AZ

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