Commit 0586dbb5 authored by Ivan Tyagov's avatar Ivan Tyagov

Log more verbose error details.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14414 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent da52b341
...@@ -251,10 +251,7 @@ class OOoDocument(File, ConversionCacheMixin): ...@@ -251,10 +251,7 @@ class OOoDocument(File, ConversionCacheMixin):
enc(_unpackData(self.getBaseData())), enc(_unpackData(self.getBaseData())),
None, None,
format) format)
#except Exception, inst: # XXX: handle possible OOOd server failure
# # Catch, log and raise errors with converting server.Explicitly raise the exception!
# LOG('[DMS]', ERROR, 'Error generating document %s' % inst)
# raise Exception
return response_dict['mime'], Pdata(dec(response_dict['data'])) return response_dict['mime'], Pdata(dec(response_dict['data']))
# Conversion API # Conversion API
...@@ -392,7 +389,7 @@ class OOoDocument(File, ConversionCacheMixin): ...@@ -392,7 +389,7 @@ class OOoDocument(File, ConversionCacheMixin):
self._setBaseContentType(metadata['MIMEType']) self._setBaseContentType(metadata['MIMEType'])
else: else:
# log and raise errors with converting server.Explicitly raise the exception! # log and raise errors with converting server.Explicitly raise the exception!
LOG('[DMS]', ERROR, 'Error converting document to base format %s' %inst) LOG('[DMS]', ERROR, 'Error converting document to base format %s:%s' %(response_code, response_message))
raise ConversionError(response_code), response_message raise ConversionError(response_code), response_message
security.declareProtected(Permissions.AccessContentsInformation, 'getContentInformation') security.declareProtected(Permissions.AccessContentsInformation, 'getContentInformation')
...@@ -419,5 +416,5 @@ class OOoDocument(File, ConversionCacheMixin): ...@@ -419,5 +416,5 @@ class OOoDocument(File, ConversionCacheMixin):
self._setBaseData(dec(response_dict['data'])) self._setBaseData(dec(response_dict['data']))
else: else:
# log and raise errors with converting server.Explicitly raise the exception! # log and raise errors with converting server.Explicitly raise the exception!
LOG('[DMS]', ERROR, 'Error getting document\'s metadata %s' %inst) LOG('[DMS]', ERROR, 'Error getting document\'s metadata %s:%s' %(response_code, response_message))
raise ConversionError(response_code), response_message raise ConversionError(response_code), response_message
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