Re: Beans throwing exceptions

2005-07-06 Thread GnomeKing
On 02/07/05, GnomeKing <[EMAIL PROTECTED]> wrote:
> I have a bean which occasionally throws an exception
> 
> My exception is caught in TagUtils.java:962 (struts-1.2.7), saved
> (967) and then a completely new JspException thrown (968).
> This exception is then caught on line 894, and saved, and then rethrown...

If it is not possible to get the exception because struts hides it, is
it possible to save the exception myself?

Can I catch the exception in my bean and save it somewhere (then
re-throw it to ensure we go to an error page)?
Because its in a getter/setter for a bean, I can't see how to get the
context - but can I retrieve the context from static methods? or some
other way?

Is the above error considered a bug in Struts? because if it is, I'm
more than happy to report it (I guess if it is a bug, the new
JspException should just wrap the caught exception?)

Thanks in advance for any suggestions,

Bob

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Beans throwing exceptions

2005-07-02 Thread GnomeKing
I have a bean which occasionally throws an exception

This exception is caught in TagUtils.java:962 (struts-1.2.7), saved
(967) and then a completely new JspException thrown (968).  I'm
assuming this is what is happening, but I don't have a stack trace to
indicate it - but that is the only location the exception message is
referenced.

This exception is then caught on line 894, and saved, and then rethrown...

The problem is that the saving the exception only seems to support one
exception at a time?

How can I access the real exception from my error JSP, rather than the
fresh JspException thrown by Struts?

Thanks for the help,

Bob

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]