Description
Because at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:439) throws a WicketException, the component location etc are not shown which makes it hard to track down. This patch causes the component detail to be shown shown, to help track down problems.
Index: src/main/java/org/apache/wicket/Component.java
===================================================================
— src/main/java/org/apache/wicket/Component.java (revision 780169)
+++ src/main/java/org/apache/wicket/Component.java (working copy)
@@ -1650,7 +1650,14 @@
if (model != null)
{
// Get model value for this component.
- return model.getObject();
+ try
+ { + return model.getObject(); + }+ catch (Exception e)
{ + throw new RuntimeException(e); + }
+}
{ throw re; }
else
{
@@ -2665,7 +2672,8 @@ - throw new WicketRuntimeException("Exception in rendering component: " + this, re);
+ throw new WicketRuntimeException("Exception in rendering component: " +
+ this.toString(true), re);
}
}