You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Antony Stubbs (JIRA)" <ji...@apache.org> on 2009/07/07 04:19:14 UTC

[jira] Created: (WICKET-2356) component report more informative message on error loading model object

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
            Priority: Minor


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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-2356) component report more informative message on error loading model object

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (WICKET-2356) component report more informative message on error loading model object

Posted by "Antony Stubbs (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antony Stubbs updated WICKET-2356:
----------------------------------

    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);
+			}
 		}
 		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);
 		}
 	}
 


  was: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.


> 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
>            Priority: Minor
>
> 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.