You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martijn Dashorst <ma...@gmail.com> on 2007/05/01 00:55:59 UTC

Line precise error messages while constructing component tree

I just had a small idea, to regain the line precise error message when
we construct the component tree we lost in the constructor change
removal.

Why don't we record the stack trace in Component#Component() if we are
in development mode, and put it in the meta data or in a temporary
store in the request cycle?

This way if something goes wrong during construction, we can display
the component that is in violation and show the exact line number
where the component is constructed.

Something similar can be done with the 'add' method.

WDYT?

Martijn

-- 
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.6 contains a very important fix. Download Wicket now!
http://wicketframework.org

Re: Line precise error messages while constructing component tree

Posted by Julian Klappenbach <jk...@gmail.com>.
If it works, I like a lot.

Coming from a Struts background, precision in error messages is not a given,
and can contribute significantly in the learning curve for new adoptees.

-jjk

On 4/30/07, Martijn Dashorst <ma...@gmail.com> wrote:
>
> I just had a small idea, to regain the line precise error message when
> we construct the component tree we lost in the constructor change
> removal...
>

Re: Line precise error messages while constructing component tree

Posted by Eelco Hillenius <ee...@gmail.com>.
Where is it used and what does it look like Martijn? Also, could you
open and resolve a JIRA issue for this so that it is part of the
change log?

Cheers,

Eelco


On 5/9/07, Martijn Dashorst <ma...@gmail.com> wrote:
> OK, I am now committing this feature. It is in!
>
> Martijn
>
> On 5/1/07, Al Maw <wi...@almaw.com> wrote:
> > Martijn Dashorst wrote:
> > > I just had a small idea, to regain the line precise error message when
> > > we construct the component tree we lost in the constructor change
> > > removal.
> > >
> > > Why don't we record the stack trace in Component#Component() if we are
> > > in development mode, and put it in the meta data or in a temporary
> > > store in the request cycle?
> > >
> > > This way if something goes wrong during construction, we can display
> > > the component that is in violation and show the exact line number
> > > where the component is constructed.
> > >
> > > Something similar can be done with the 'add' method.
> >
> > Yes! That sounds like an excellent idea. :-)
> > +1
> >
> > Alastair
> >
>
>
> --
> Learn Wicket at ApacheCon Europe: http://apachecon.com
> Join the wicket community at irc.freenode.net: ##wicket
> Wicket 1.2.6 contains a very important fix. Download Wicket now!
> http://wicketframework.org
>

Re: Line precise error messages while constructing component tree

Posted by Martijn Dashorst <ma...@gmail.com>.
OK, I am now committing this feature. It is in!

Martijn

On 5/1/07, Al Maw <wi...@almaw.com> wrote:
> Martijn Dashorst wrote:
> > I just had a small idea, to regain the line precise error message when
> > we construct the component tree we lost in the constructor change
> > removal.
> >
> > Why don't we record the stack trace in Component#Component() if we are
> > in development mode, and put it in the meta data or in a temporary
> > store in the request cycle?
> >
> > This way if something goes wrong during construction, we can display
> > the component that is in violation and show the exact line number
> > where the component is constructed.
> >
> > Something similar can be done with the 'add' method.
>
> Yes! That sounds like an excellent idea. :-)
> +1
>
> Alastair
>


-- 
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.6 contains a very important fix. Download Wicket now!
http://wicketframework.org

Re: Line precise error messages while constructing component tree

Posted by Al Maw <wi...@almaw.com>.
Martijn Dashorst wrote:
> I just had a small idea, to regain the line precise error message when
> we construct the component tree we lost in the constructor change
> removal.
> 
> Why don't we record the stack trace in Component#Component() if we are
> in development mode, and put it in the meta data or in a temporary
> store in the request cycle?
> 
> This way if something goes wrong during construction, we can display
> the component that is in violation and show the exact line number
> where the component is constructed.
> 
> Something similar can be done with the 'add' method.

Yes! That sounds like an excellent idea. :-)
+1

Alastair