You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by jo...@apache.org on 2004/01/28 13:35:38 UTC
cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel Output.java
joerg 2004/01/28 04:35:38
Modified: src/blocks/woody/java/org/apache/cocoon/woody/formmodel
Output.java
Log:
added the mismatching types to the exception message
Revision Changes Path
1.5 +7 -3 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Output.java
Index: Output.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Output.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Output.java 19 Dec 2003 21:28:39 -0000 1.4
+++ Output.java 28 Jan 2004 12:35:37 -0000 1.5
@@ -68,9 +68,13 @@
}
public void setValue(Object object) {
- if (object != null && !definition.getDatatype().getTypeClass().isAssignableFrom(object.getClass()))
- throw new RuntimeException("Tried to set value of output widget \"" + getFullyQualifiedId() + "\" with an object of an incorrect type.");
-
+ if (object != null && !definition.getDatatype().getTypeClass().isAssignableFrom(object.getClass())) {
+ throw new RuntimeException("Tried to set value of output widget \""
+ + getFullyQualifiedId()
+ + "\" with an object of an incorrect type: "
+ + "expected " + definition.getDatatype().getTypeClass()
+ + ", received " + object.getClass() + ".");
+ }
value = object;
}
}