Commit ea4bf9d0 authored by Vincent Pelletier's avatar Vincent Pelletier

Iclude representation of invalid values when detected to make log messages save investigation time.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15983 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c8a0882e
......@@ -46,7 +46,7 @@ def SQLVar_render(self, md):
if not v and args.has_key('optional') and args['optional']:
return 'null'
raise ValueError, (
'Invalid integer value for <em>%s</em>' % name)
'Invalid integer value for <em>%s</em>: %r' % (name, v))
elif t=='float':
try:
if type(v) is StringType:
......@@ -58,7 +58,7 @@ def SQLVar_render(self, md):
if not v and args.has_key('optional') and args['optional']:
return 'null'
raise ValueError, (
'Invalid floating-point value for <em>%s</em>' % name)
'Invalid floating-point value for <em>%s</em>: %r' % (name, v))
# Patched by yo
elif t=='datetime':
if v is None:
......@@ -90,7 +90,7 @@ def SQLVar_render(self, md):
return 'null'
else:
raise ValueError, (
'Invalid string value for <em>%s</em>' % name)
'Invalid string value for <em>%s</em>: %r' % (name, v))
# End of patch
if not isinstance(v, (str, unicode)):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment