tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yansheng Lin" <yansheng....@silvacom.com>
Subject RE: Tomcat and checked vs. unchecked exceptions
Date Fri, 20 Feb 2004 20:49:36 GMT
Not trying to be smart or anything here, but you might want to take a look at
declarative exception handling in Struts.  it's new in 1.1.  That way, you have
more control over exceptions in your action class. 

Just a suggestion:).
	

-----Original Message-----
From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com] 
Sent: Friday, February 20, 2004 10:07 AM
To: Tomcat Users List
Subject: RE: Tomcat and checked vs. unchecked exceptions



Howdy,

>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>

Try <exception-type>java.lang.RuntimeException</exception-type>, as
that's the superclass for unchecked exceptions and you probably want to
handle them all the same (if you want to handle them at all, which
apparently you do).

Yoav Shapira



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to whom
it is addressed, and may not be saved, copied, printed, disclosed or used by
anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


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


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


Mime
View raw message