You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by no...@apache.org on 2010/08/16 15:59:27 UTC
svn commit: r985931 -
/pivot/trunk/core/src/org/apache/pivot/beans/BeanAdapter.java
Author: noelgrandin
Date: Mon Aug 16 13:59:27 2010
New Revision: 985931
URL: http://svn.apache.org/viewvc?rev=985931&view=rev
Log:
improve exception error message
Modified:
pivot/trunk/core/src/org/apache/pivot/beans/BeanAdapter.java
Modified: pivot/trunk/core/src/org/apache/pivot/beans/BeanAdapter.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/beans/BeanAdapter.java?rev=985931&r1=985930&r2=985931&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/beans/BeanAdapter.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/beans/BeanAdapter.java Mon Aug 16 13:59:27 2010
@@ -150,9 +150,7 @@ public class BeanAdapter implements Map<
private static final String ILLEGAL_ACCESS_EXCEPTION_MESSAGE_FORMAT =
"Unable to access property \"%s\" for type %s.";
- private static final String INVOCATION_TARGET_EXCEPTION_MESSAGE_FORMAT =
- "Error getting or setting property \"%s\" for type %s.";
-
+
/**
* Creates a new bean dictionary.
*
@@ -231,7 +229,7 @@ public class BeanAdapter implements Map<
throw new RuntimeException(String.format(ILLEGAL_ACCESS_EXCEPTION_MESSAGE_FORMAT,
key, bean.getClass().getName()), exception);
} catch (InvocationTargetException exception) {
- throw new RuntimeException(String.format(INVOCATION_TARGET_EXCEPTION_MESSAGE_FORMAT,
+ throw new RuntimeException(String.format("Error getting property \"%s\" for type %s.",
key, bean.getClass().getName()), exception.getCause());
}
}
@@ -317,8 +315,8 @@ public class BeanAdapter implements Map<
throw new RuntimeException(String.format(ILLEGAL_ACCESS_EXCEPTION_MESSAGE_FORMAT,
key, bean.getClass().getName()), exception);
} catch (InvocationTargetException exception) {
- throw new RuntimeException(String.format(INVOCATION_TARGET_EXCEPTION_MESSAGE_FORMAT,
- key, bean.getClass().getName()), exception.getCause());
+ throw new RuntimeException(String.format("Error setting property \"%s\" for type %s to value \"%s\"",
+ key, bean.getClass().getName(), "" + value), exception.getCause());
}
}