mirror of
https://github.com/ankitects/anki.git
synced 2026-01-14 06:23:57 -05:00
Use traceback.format_exception for debug error display.
This commit is contained in:
parent
a8b302c7f2
commit
ecba3f429b
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