Closed CharlieCorner closed 7 years ago
No, I agree that wrapping the exception diminishes the value instead of increasing it.
I'd check to see if any code depends on FatalError
, and - if not - remove the wrapping.
I mean, if we really want to keep the wrapping I think it is still doable.
Granted, in Python3 we have the raise-from statement and it'd be easier,
but in Python2 we'd need to jump through a few hoops in order to implement
it correctly using sys.exc_info
, we just need to take into account the
Warnings stated in the documentation:
Recently #81 was raised to troubleshoot a problem when downloading chapters, but the Tracebacks that were shared didn't have enough information to pinpoint exactly where the code actually broke and why.
This is because in
base.py
lines 391-403 of theDownloadChapterThread
class we are re-raising aFatalError
with just a short message but not preserving the original Traceback:If an Exception is raised in any part of the underlying code in
self.siteParse.processChapter(self, self.chapter)
it will be silenced by the code on line 403 where weraise FatalError
.We need to find a way to either wrap the original exception properly in a FatalError, or just re-raise the original
exception
altogether so as not to lose our ability to hunt down bugs.Unless I'm skipping something is raising our custom FatalError really giving us any value here?