Author: ianb
Date: 2006-10-18 16:54:35 -0600 (Wed, 18 Oct 2006)
New Revision: 2026
Modified:
FormEncode/trunk/formencode/htmlfill.py
Log:
Fix the way the last commit raises the error
Modified: FormEncode/trunk/formencode/htmlfill.py
===================================================================
--- FormEncode/trunk/formencode/htmlfill.py 2006-10-18 22:08:13 UTC (rev
2025)
+++ FormEncode/trunk/formencode/htmlfill.py 2006-10-18 22:54:35 UTC (rev
2026)
@@ -236,17 +236,17 @@
t for t in self._content if not isinstance(t, tuple)])
except UnicodeDecodeError, e:
if self.data_is_str:
- raise UnicodeDecodeError(
+ e.reason += (
"The form was passed in as an encoded string, but "
"some data or error messages were unicode strings; "
- "the form should be passed in as a unicode string "
- "(error: %s)" % e)
+ "the form should be passed in as a unicode string")
else:
- raise UnicodeDecodeError(
+ e.reason += (
"The form was passed in as an unicode string, but "
"some data or error message was an encoded string; "
"the data and error messages should be passed in as "
- "unicode strings (error: %s)" % e)
+ "unicode strings")
+ raise
def add_key(self, key):
self.used_keys[key] = 1
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
FormEncode-CVS mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/formencode-cvs