better error messages

This commit is contained in:
jonaswinkler 2021-01-27 17:56:06 +01:00
parent 91f7c4e685
commit b0ed06003b
2 changed files with 3 additions and 3 deletions

View File

@ -158,7 +158,7 @@ class Consumer(LoggingMixin):
self.override_tag_ids = override_tag_ids
self.task_id = task_id or str(uuid.uuid4())
self._send_progress(0, 100, 'WORKING', _('Received new file'))
self._send_progress(0, 100, 'STARTING', _('Received new file'))
# this is for grouping logging entries for this particular file
# together.

View File

@ -190,11 +190,11 @@ class RasterisedDocumentParser(DocumentParser):
# Also, no archived file.
if not self.text:
# However, if we don't have anything, fail:
raise ParseError(e)
raise ParseError(e.__class__.__name__ + ": " + str(e))
except Exception as e:
# Anything else is probably serious.
raise ParseError(e)
raise ParseError(e.__class__.__name__ + ": " + str(e))
if not self.text:
# This may happen for files that don't have any text.