I just saw that markupStream is transient, so in order to make this work, I'd have to store the String instead of the stream. I guess that these exceptions are not supposed to happen often, and storing a string is not going to bring our servers down.
Martijn On Fri, Apr 8, 2011 at 11:22 AM, Martijn Dashorst <[email protected]> wrote: > Currently MarkupException appends the markup stream to the message. > This makes the error page less useful IMO since the page first shows > the error message, followed by the markup without line precise error > and then repeats the markup again, but now showing the exact location > where the error occurred. > > The first markup part should just not be there. I'd suggest the following: > > - In the constructors just pass the message to super, not the markup stream > - override toString() and append the markupstream there to the output, > making it possible to log the full error > - in the error page, don't use toString(), but getMessage() and the > getMarkupstream() methods to display the error > > Anyone object? > > Martijn > > -- > Become a Wicket expert, learn from the best: http://wicketinaction.com > -- Become a Wicket expert, learn from the best: http://wicketinaction.com
