Marc Krisjanous wrote:
> Hi all,
> thank you for you great comments!
>
> Craig - could you possibly suggest a resource I can look at for the
> Throwable statement you used in your example? I do not understand how it
> works.
>
Well, there's always the JDK's Javadoc documentation (for class
java.lang.Throwable) :-).
Throwable is the parent class of absolutely every kind of exception or
error
that can be thrown -- hence it's name. So, doing a catch for
"Throwable"
catches any and all exceptions, because they are all subclasses of
Throwable.
A common approach is to deal specifically with certain kinds of
exceptions based
on their type, and have a catch-all for everything else. As long as you
put the
catch-all block last:
try {
... do something ...
} catch (ServletException e) {
... handle a servlet exception ...
} catch (IOException e) {
... handle an input/output error ...
} catch (Throwable t) {
... handle anything else ...
}
> Best Regards
>
> Marc
>
Craig McClanahan
====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00): Sun Technical Briefing
Session T06 (24-Oct 14h00-15h00): Migrating Apache JServ
Applications to Tomcat
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html