2nd stage of better error reporting
Sebastian at SSpaeth.de
Tue Jun 14 09:22:43 BST 2011
The introduction of OfflineImapError at different severity levels
allowed us to throw errors that can be used to only skip messages, or
folders and continue with the rest. However, our logging still sucked,
just outputting a notice in the log which could easily be overlooked.
This patch series implements a UI.error() function that takes an
Exception (and possibly a prepending explaining message) and:
1) Outputs the Exception string to the error log whenever it occurs.
2) Stores all occurring exceptions in a Queue.
3) At program exits, outputs all Exceptions again.
This allows a user to easily see which messages and folders (or
accounts) have been skipped, so that she can take action to fix whatever
If (and only if) we are in debug mode, we will also output the traceback
of the exception that has occurred. This should do away with what looked
ugly "as a crash" to users, but still let's us collect tracebacks when
we need them for debugging.
Unrelated cleanup patch in the traceback formatting that should be
applied in any case.
The main patch, implementing the infrastructure for ui.error() and
doing the logging.
Converts accounts.py to use the new ui.error() infrastructure
Converts folder/Base to use the new ui.error() infrastructure
There are still a few other places left that can make use of the new
infrastructure, but I wanted to get this one in first, before I waste
efforts in case this gets rejected.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the OfflineIMAP-project