Author: rgardler
Date: Mon Oct 24 06:32:28 2005
New Revision: 328061
URL: http://svn.apache.org/viewcvs?rev=328061&view=rev
Log:
better reporting when a property value cannot be found
Modified:
forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java
Modified: forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java?rev=328061&r1=328060&r2=328061&view=diff
==============================================================================
--- forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java
(original)
+++ forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java Mon
Oct 24 06:32:28 2005
@@ -53,10 +53,17 @@
public Object getAttribute(String name, Configuration modeConf,
Map objectModel) throws ConfigurationException {
- String original = super.getAttributeValues(name, modeConf,
objectModel)[0]
- .toString();
- String attributeValue = this.getAttributeValues(name, modeConf,
- objectModel)[0].toString();
+ String original;
+ String attributeValue;
+
+ try {
+ original = super.getAttributeValues(name, modeConf, objectModel)[0]
+ .toString();
+ attributeValue = this.getAttributeValues(name, modeConf,
+ objectModel)[0].toString();
+ } catch (NullPointerException npe) {
+ throw new ConfigurationException("Unable to get attribute value for
" + name);
+ }
if (debugging()) {
debug(" - Requested:" + name);