mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 00:57:09 +01:00
When raising an exception during exception handling, chain them together for slightly cleaner logs
This commit is contained in:
parent
7488505e37
commit
b70e21a6d5
5 changed files with 31 additions and 15 deletions
|
|
@ -101,8 +101,8 @@ class DocumentClassifier:
|
|||
self.correspondent_classifier = pickle.load(f)
|
||||
self.document_type_classifier = pickle.load(f)
|
||||
self.storage_path_classifier = pickle.load(f)
|
||||
except Exception:
|
||||
raise ClassifierModelCorruptError()
|
||||
except Exception as err:
|
||||
raise ClassifierModelCorruptError() from err
|
||||
|
||||
# Check for the warning about unpickling from differing versions
|
||||
# and consider it incompatible
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue