Can you be more specific? What kind of unexpected runtime exceptions are you
talking about? I don't think I understood you correctly. 

Any runtime exception thrown by the wicket is caused by a programming
error... there is no sense to catch it without fixing the problem in your
code. 
Catching runtime exception could make sense if the runtime exception is
thrown by some business logic you are invoking inside wicket components....
but this kind of issue is your responsibility..

Alex Objelean  


aditsu wrote:
> 
> Well, I'm specifically talking about unexpected runtime exceptions. I
> don't want those to destroy the whole page.
> They can kill a component, that's ok, but the rest of the page should
> work.
> And yes I want to "make sure that no exceptions are thrown", except that's
> not so simple when you're dealing with a complex site and lots of pages,
> components and models. If I missed any exceptions, I want those to be
> handled gracefully rather than redirecting to an error page.
> 
> renderAll is ONLY called on the page, all other components go through
> renderComponentTagBody to call renderNext, and both renderComponentTagBody
> and renderNext are final :(
> I tried overriding onComponentTagBody and wrapping the super invocation
> with try/catch, but then the markup gets broken because it doesn't close
> tags (i.e. advance in the markup stream?) after the exception is thrown in
> a child component, and I still get an error page :(
> renderComponent(MarkupStream) is final too, it seems that all "doors" are
> closed and locked...
> 
> 
> Erik van Oosten wrote:
>> 
>> It won't. I think you have to dig deeper into the request rendering.
>> 
>> Perhaps that overriding MarkupContainer#renderAll on all your Panels 
>> that have expected exceptions will help.
>> 
>> But then again, exceptions are intended for controlling the 
>> non-expected. You should not use exceptions for normal page flow. In 
>> other words: just make sure that no exceptions are thrown.
>> 
>> Regards,
>>     Erik.
>> 
>> 
>> aditsu wrote:
>>> Ok, but how would that let me render the rest of the page?
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Handling-exceptions-during-render-tp20301737p20310197.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to