[
https://issues.apache.org/jira/browse/WICKET-2356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Juergen Donnerstag resolved WICKET-2356.
----------------------------------------
Resolution: Fixed
Fix Version/s: 1.5-M1
Assignee: Juergen Donnerstag
fixed
> component report more informative message on error loading model object
> -----------------------------------------------------------------------
>
> Key: WICKET-2356
> URL: https://issues.apache.org/jira/browse/WICKET-2356
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4-RC6
> Reporter: Antony Stubbs
> Assignee: Juergen Donnerstag
> Priority: Minor
> Fix For: 1.5-M1
>
>
> 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);
> + }
> }
> else
> {
> @@ -2665,7 +2672,8 @@
> {
> throw re;
> }
> - throw new WicketRuntimeException("Exception in
> rendering component: " + this, re);
> + throw new WicketRuntimeException("Exception in
> rendering component: " +
> + this.toString(true), re);
> }
> }
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.