mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-04 03:27:12 -05:00 
			
		
		
		
	better error messages
This commit is contained in:
		
							parent
							
								
									91f7c4e685
								
							
						
					
					
						commit
						b0ed06003b
					
				@ -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.
 | 
			
		||||
 | 
			
		||||
@ -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.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user