You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ma...@yahoo.com on 2010/01/12 19:20:52 UTC

[S2] Does global exception mapping work with interceptor?

Hello,

I've defined a global exception mapping and global result, when Exception happen it will go to my custom error page. It work fine in Action if Action throw any exception. But if my interceptor throw exception, it won't go to my error page.

Is there anyway to make it work? 

Thanks
LV

Re: [S2] Does global exception mapping work with interceptor?

Posted by ma...@yahoo.com.
Thanks Gabriel, it is working now!



________________________________
From: Gabriel Belingueres <be...@gmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Tue, January 12, 2010 7:06:59 PM
Subject: Re: [S2] Does global exception mapping work with interceptor?

Is your custom interceptor _before_ the exception interceptor in your
interceptor stack? If that's the case, then the exception interceptor
is not "catching" exceptions from your interceptor because it executes
after.

2010/1/12  <ma...@yahoo.com>:
> Hello,
>
> I've defined a global exception mapping and global result, when Exception happen it will go to my custom error page. It work fine in Action if Action throw any exception. But if my interceptor throw exception, it won't go to my error page.
>
> Is there anyway to make it work?
>
> Thanks
> LV

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

Re: [S2] Does global exception mapping work with interceptor?

Posted by Gabriel Belingueres <be...@gmail.com>.
Is your custom interceptor _before_ the exception interceptor in your
interceptor stack? If that's the case, then the exception interceptor
is not "catching" exceptions from your interceptor because it executes
after.

2010/1/12  <ma...@yahoo.com>:
> Hello,
>
> I've defined a global exception mapping and global result, when Exception happen it will go to my custom error page. It work fine in Action if Action throw any exception. But if my interceptor throw exception, it won't go to my error page.
>
> Is there anyway to make it work?
>
> Thanks
> LV

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