click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Schellink <>
Subject Re: Exception handling
Date Mon, 12 Mar 2012 16:30:17 GMT
Hi Seema,

The Click ErrorPage concept is really meant for exceptions that wasn't anticipated in the

application, ie RuntimeExceptions. You could always handle checked exceptions explicitly in
services and pages ie. create and throw an ApplicationException class.

If you really want to handle RuntimeExceptions in your pages you could stick the exception
in the 
session as a flash variable[1][2] and retrieve the message from your page.




On 12/03/2012 16:00 PM, gilbertoca [via click] wrote:
>     Seema wrote
>     I want to have a centralized mechanism for showing error messages in my pages for
>     that are thrown to the UI layer. Instead of having a single error page across the
app, I want to
>     be able to show the error message in the same page that caused the error. I tried
>     ClickServlet and overrided the handleException method where I'm able to get the error
>     corresponding to the exception. I need reference to the page object here so that
I can set the
>     error message as a bindable, but this method only takes the page class as the argument.
>     someone suggest a solution?
> Hi, Seema!
> I recommend that you subscribe to the Apache Click mail-list[1].
> I've forwarded you question for all community.
> Hth,
> Gilberto
> [1]
> ----------------------------------------------------------------------------------------------------
> If you reply to this email, your message will be added to the discussion below:
> This email was sent by gilbertoca
> <>
(via Nabble)
> To receive all replies by email, subscribe to this discussion
> <>

View raw message