You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alfonso Quiroga <al...@gmail.com> on 2012/09/03 20:00:33 UTC

exception handling (get cause page)

Hi! I have a custom exception handler, and I have this method:

onException(RequestCycle cycle, Exception anException) {
  ....
}


Inside this method, how can I get the original page who caused the
exception? in other Wicket version, I had  "onRuntimeException"
method, who already had the original page.

Thanks in advance!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: exception handling (get cause page)

Posted by Alfonso Quiroga <al...@gmail.com>.
It works perfectly thanks

On Mon, Sep 3, 2012 at 3:11 PM, Martin Grigorov <mg...@apache.org> wrote:
> Hi,
>
> See https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/request/cycle/PageRequestHandlerTracker.java
> Register it, then use it:
> PageRequestHandlerTracker.getLastHandler(cycle).getPage()
>
>
> On Mon, Sep 3, 2012 at 8:00 PM, Alfonso Quiroga <al...@gmail.com> wrote:
>> Hi! I have a custom exception handler, and I have this method:
>>
>> onException(RequestCycle cycle, Exception anException) {
>>   ....
>> }
>>
>>
>> Inside this method, how can I get the original page who caused the
>> exception? in other Wicket version, I had  "onRuntimeException"
>> method, who already had the original page.
>>
>> Thanks in advance!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: exception handling (get cause page)

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

See https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/request/cycle/PageRequestHandlerTracker.java
Register it, then use it:
PageRequestHandlerTracker.getLastHandler(cycle).getPage()


On Mon, Sep 3, 2012 at 8:00 PM, Alfonso Quiroga <al...@gmail.com> wrote:
> Hi! I have a custom exception handler, and I have this method:
>
> onException(RequestCycle cycle, Exception anException) {
>   ....
> }
>
>
> Inside this method, how can I get the original page who caused the
> exception? in other Wicket version, I had  "onRuntimeException"
> method, who already had the original page.
>
> Thanks in advance!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org