struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: Trap listener exceptions
Date Thu, 20 Mar 2003 12:43:50 GMT
Although you might be able to throw a custom runtime exception and handle it
through the servlet error page mechanism.

Quoting David Graham <dgraham1980@hotmail.com>:

> You can't.  The listener method doesn't define any thrown exceptions so your
> 
> implementation can't either.
> 
> David
> 
> 
> 
> >From: Mohan Radhakrishnan <MohanR@hclcomnet.co.in>
> >Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> >To: 'Struts Users Mailing List' <struts-user@jakarta.apache.org>
> >Subject: Trap listener exceptions
> >Date: Thu, 20 Mar 2003 09:04:34 +0530
> >
> >Hi
> >
> >     What is the best practice to trap exceptions thrown in listeners ? My
> >ServletContextListener might throw custom exceptions which the UI should
> >respond to properly by showing a message.
> >
> >     How do you make custom exceptions bubble up from methods like
> >
> >	public void contextInitialized( ServletContextEvent sce ){ // throws
> >DataException
> >	}
> >
> >Mohan

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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


Mime
View raw message