Hi,
On Fri, Mar 14, 2014 at 1:16 AM, jchappelle <
[hidden email]> wrote:
> I am using wicket 6.14.0.
>
> I have a RequestCycleListener that listens for onException. I handle
> PageExpiredException, UnauthorizedInstantiationException(this is custom),
> and by default I redirect to a custom ErrorPage class that takes the
> Exception object in the constructor. It also contains a list of ignored
> exceptions that it will return null for. This custom ErrorPage actually
> reports an error to our JIRA bug tracker when it renders to the user.
>
> The problem I am having is we are getting a lot of bug reports for things
> like StalePageException and ComponentNotFoundException when I think wicket
>
Indeed Wicket handles StalePageException.
ComponentNotFoundException usually means that there is an error in the
application, so I think it is good to handle it as you do now.
> can handle those without the user knowing. While I can add them to the
> ignored list, I don't think this is a good design because as wicket
> changes,
> these exceptions can change.
>
> I would like a way to just register my internal error page with
> getApplicationSettings().setInternalErrorPage(...) but I can't because I
> won't have my Exception passed to my error page. Is there a way to do this?
> Or is there some way to access the last exception associated with the
> session?
>
> I suppose I can create an Exception variable in my Session class and set it
> in my RequestCycleListener but I'm hoping there is a better way.
>
storing it in the session is the best place.
other places to store it are RequestCycle's metadata or a ThreadLocal but
usually Wicket will make a http redirect to load the configured internal
error page and those won't be valid any more.
How do you check whether a given type of error is logged in Jira just once ?
An attacker can create thousands of tickets in Jira by just reloading a
page that leads to a problem.