mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-03-30 13:22:12 -04:00
don't print exceptions directly, use traceback.print_exc() instead
This makes debugging actually useful, by seeing what failed.
This commit is contained in:
parent
660b4233aa
commit
6583e1e2fb
@ -89,8 +89,9 @@ class SNBFile:
|
||||
uncompressedData += bzdc.decompress(data)
|
||||
else:
|
||||
uncompressedData += data
|
||||
except Exception as e:
|
||||
print(e)
|
||||
except Exception:
|
||||
import traceback
|
||||
print(traceback.print_exc())
|
||||
if len(uncompressedData) != self.plainStreamSizeUncompressed:
|
||||
raise Exception()
|
||||
f.fileBody = uncompressedData[plainPos:plainPos+f.fileSize]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user