mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Merge pull request #325 from MHordecki/format_exception
Use traceback.format_exception for debug error display.
This commit is contained in:
commit
b0bf0adacf
1 changed files with 2 additions and 3 deletions
|
@ -12,9 +12,8 @@ from aqt import mw
|
|||
|
||||
if not os.environ.get("DEBUG"):
|
||||
def excepthook(etype,val,tb):
|
||||
sys.stderr.write("Caught exception:\n%s%s\n" % (
|
||||
''.join(traceback.format_tb(tb)),
|
||||
'{0}: {1}'.format(etype, val)))
|
||||
sys.stderr.write("Caught exception:\n%s\n" % (
|
||||
''.join(traceback.format_exception(etype, val, tb))))
|
||||
sys.excepthook = excepthook
|
||||
|
||||
class ErrorHandler(QObject):
|
||||
|
|
Loading…
Reference in a new issue