tags 450930 +patch thankyou Hi!
The attached patch fixes the bug, though it isn't an exact reprentation of the situation. The resolution of the object's __class__ is not happening, and I believe more hacking is needed to sort it out. But this fix should be enough for a developer to snoop around and interpret the exception. HTH. Kumar -- Kumar Appaiah, 458, Jamuna Hostel, Indian Institute of Technology Madras, Chennai - 600 036
diff -urN libfreemarker-java-2.3.10.orig/src/freemarker/ext/jython/JythonHashModel.java libfreemarker-java-2.3.10/src/freemarker/ext/jython/JythonHashModel.java
--- libfreemarker-java-2.3.10.orig/src/freemarker/ext/jython/JythonHashModel.java 2007-11-14 10:45:22.000000000 +0530
+++ libfreemarker-java-2.3.10/src/freemarker/ext/jython/JythonHashModel.java 2007-11-14 10:45:49.000000000 +0530
@@ -137,7 +137,7 @@
{
throw new TemplateModelException(e);
}
- throw new TemplateModelException("'?keys' is not supported as there is no 'keys' nor 'keySet' attribute on an instance of " + object.__class__.__name__);
+ throw new TemplateModelException("'?keys' is not supported as there is no 'keys' nor 'keySet' attribute on an instance of " + object.toString());
}
/**
@@ -157,6 +157,6 @@
{
throw new TemplateModelException(e);
}
- throw new TemplateModelException("'?values' is not supported as there is no 'values' attribute on an instance of " + object.__class__.__name__);
+ throw new TemplateModelException("'?values' is not supported as there is no 'values' attribute on an instance of " + object.toString());
}
}
signature.asc
Description: Digital signature

