You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Entropy <bl...@gmail.com> on 2014/06/04 16:43:27 UTC
Error page stack trace
We set our error page via setInternalErrorPage on IApplicationSettings in
1.6. I'd like to bury the stack trace in a comment in the rendered page in
our staging and dev environments to save time. But I have no idea how to
get the originating trace in the error page.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Error-page-stack-trace-tp4666119.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Error page stack trace
Posted by Entropy <bl...@gmail.com>.
Nevermind, I figured out from other examples that they tend to share the key
in a static constant so that it becomes the object identity that allows you
to access the meta data object. I wonder if that is really the intended
use, but intended or not, it works.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Error-page-stack-trace-tp4666119p4666129.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Error page stack trace
Posted by Martin Grigorov <mg...@apache.org>.
See
declare a key:
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/request/cycle/PageRequestHandlerTracker.java#L40
set a value:
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/request/cycle/PageRequestHandlerTracker.java#L97
get a value:
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/request/cycle/PageRequestHandlerTracker.java#L120
Martin Grigorov
Wicket Training and Consulting
On Wed, Jun 4, 2014 at 8:47 PM, Entropy <bl...@gmail.com> wrote:
> The meta data facility looks intriguing but is a bit confusing. How is
> this
> supposed to work? I was expecting something like a map, but the key has to
> be this abstract object that takes an arrya of entry objects? And each
> entry object demands reference back to it's key? This is a confusing
> object, and the examples I see online haven't been very illuminating. How
> would I store and retrieve the exception from this collection by a simple
> string constant?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Error-page-stack-trace-tp4666119p4666127.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: Error page stack trace
Posted by Entropy <bl...@gmail.com>.
The meta data facility looks intriguing but is a bit confusing. How is this
supposed to work? I was expecting something like a map, but the key has to
be this abstract object that takes an arrya of entry objects? And each
entry object demands reference back to it's key? This is a confusing
object, and the examples I see online haven't been very illuminating. How
would I store and retrieve the exception from this collection by a simple
string constant?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Error-page-stack-trace-tp4666119p4666127.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Error page stack trace
Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Jun 4, 2014 at 5:34 PM, Sven Meier <sv...@meiers.net> wrote:
> Hi,
>
> easiest solution is to use a custom requestCycleListener to store the
> exception in a thread-local.
> You can access this variable from your custom internalErrorPage.
>
Prefer RequestCycle's metadata instead.
>
> Hope this helps
> Sven
>
>
>
> On 06/04/2014 04:43 PM, Entropy wrote:
>
>> We set our error page via setInternalErrorPage on IApplicationSettings in
>> 1.6. I'd like to bury the stack trace in a comment in the rendered page
>> in
>> our staging and dev environments to save time. But I have no idea how to
>> get the originating trace in the error page.
>>
>> --
>> View this message in context: http://apache-wicket.1842946.
>> n4.nabble.com/Error-page-stack-trace-tp4666119.html
>> Sent from the Users forum mailing list archive at Nabble.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: Error page stack trace
Posted by Sven Meier <sv...@meiers.net>.
Hi,
easiest solution is to use a custom requestCycleListener to store the
exception in a thread-local.
You can access this variable from your custom internalErrorPage.
Hope this helps
Sven
On 06/04/2014 04:43 PM, Entropy wrote:
> We set our error page via setInternalErrorPage on IApplicationSettings in
> 1.6. I'd like to bury the stack trace in a comment in the rendered page in
> our staging and dev environments to save time. But I have no idea how to
> get the originating trace in the error page.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Error-page-stack-trace-tp4666119.html
> Sent from the Users forum mailing list archive at Nabble.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: Error page stack trace
Posted by Paul Bors <pa...@bors.ws>.
Btw, this is what you want:
http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/request/cycle/AbstractRequestCycleListener.html#onException%28org.apache.wicket.request.cycle.RequestCycle,%20java.lang.Exception%29
Add your own IRequestCycleListener (AbstractRequestCycleListener) with
org.apache.wicket.Application.getRequestCycleListeners().add() and
implement its #onException(RequestCycle, Exception) then drop that in your
HTML comment.
On Wed, Jun 4, 2014 at 11:31 AM, Paul Bors <pa...@bors.ws> wrote:
> Why? You don't have access to your own log file?
>
>
> On Wed, Jun 4, 2014 at 10:43 AM, Entropy <bl...@gmail.com> wrote:
>
>> We set our error page via setInternalErrorPage on IApplicationSettings in
>> 1.6. I'd like to bury the stack trace in a comment in the rendered page
>> in
>> our staging and dev environments to save time. But I have no idea how to
>> get the originating trace in the error page.
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Error-page-stack-trace-tp4666119.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
Re: Error page stack trace
Posted by Paul Bors <pa...@bors.ws>.
Why? You don't have access to your own log file?
On Wed, Jun 4, 2014 at 10:43 AM, Entropy <bl...@gmail.com> wrote:
> We set our error page via setInternalErrorPage on IApplicationSettings in
> 1.6. I'd like to bury the stack trace in a comment in the rendered page in
> our staging and dev environments to save time. But I have no idea how to
> get the originating trace in the error page.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Error-page-stack-trace-tp4666119.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>