> We want to handle exceptions in a centralized way

My first approach would be to see how Tapestry already does it. In
TapestryModule there is a RequestFilter configured:

        configuration.addInstance("ErrorFilter", RequestErrorFilter.class);

One approach would be to add your own filter to catch your apps
exceptions so you can choose which go to the standard error page and
which go to your other error page.

The RequestErrorFilter uses services to do it's job so you could
alternatively provide your own implementation.

Josh

On Fri, Mar 4, 2011 at 9:14 AM, raulmt <rau...@gmail.com> wrote:
> We want to handle exceptions in a centralized way, so in a Page or Component
> we just throw an exception and "someone" handles that exception and shows
> the error message accordingly. For this, we override RequestExceptionHandler
> to show custom error messages depending on the type of error.
>
> The problem we have is that the Registry logs with ERROR level all of the
> exceptions thrown in any Page or Component method, so even when we throw
> these exceptions to let the RequestExceptionHandler handle them, our log
> file is full of ERROR logs of exceptions that we already handle. One
> solution could be to mute the logs from Tapestry IOC Registry, but i'm
> afraid we could miss other logs that are important. Is there a way to "mute"
> logs of exceptions already handled? Is this approach we took all wrong?
>
> Thanks.
>
> --
> View this message in context: 
> http://tapestry-users.832.n2.nabble.com/Centralize-error-handling-tp6089256p6089256.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to