Author: jcompagner Date: Tue Jun 5 14:33:12 2007 New Revision: 544643 URL: http://svn.apache.org/viewvc?view=rev&rev=544643 Log: try catch around before render
Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Page.java Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Page.java URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Page.java?view=diff&rev=544643&r1=544642&r2=544643 ============================================================================== --- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Page.java (original) +++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Page.java Tue Jun 5 14:33:12 2007 @@ -877,7 +877,24 @@ ((IFeedback)this).updateFeedback(); } - beforeRender(); + try + { + beforeRender(); + } + catch(RuntimeException e) + { + // if an exception is thrown then we have to call after render + // else the components could be in a wrong state (rendering) + try + { + afterRender(); + } + catch(RuntimeException e2) + { + // ignore this one could be a result off. + } + throw e; + } // Visit all this page's children to reset markup streams and check // rendering authorization, as appropriate. We set any result; positive