Commit 2711d40b authored by Nicolas Delaby's avatar Nicolas Delaby

Improve error message to ease debugging

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41120 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent aa82ec38
...@@ -160,8 +160,9 @@ class TextDocument(CachedConvertableMixin, BaseConvertableFileMixin, ...@@ -160,8 +160,9 @@ class TextDocument(CachedConvertableMixin, BaseConvertableFileMixin,
encoding=charset) encoding=charset)
if result is None: if result is None:
raise ConversionError('TextDocument conversion error. ' raise ConversionError('TextDocument conversion error. '
'portal_transforms failed to convert '\ 'portal_transforms failed to convert '
'to %s: %r' % (mime_type, self)) 'from %r to %s: %r' %
(src_mimetype, mime_type, self))
self.setConversion(result, original_mime_type, **kw) self.setConversion(result, original_mime_type, **kw)
else: else:
mime_type, result = self.getConversion(**kw) mime_type, result = self.getConversion(**kw)
......
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