1
0

Show error window for unhandled exceptions

Use exception hook from main thread for all threads

Use signal to delegate error window creation to GUI thread

Add more information to issue template

Update to PyQt5

Switch from Github to REST-Service

Report to web service instead of opening the browser

Fix imports

Change crashhub URL to electrum.org server

Explain that exception hooks are only used in the Qt Gui now
This commit is contained in:
Johann Bauer
2017-03-28 15:49:50 +02:00
parent 3dd4285fc5
commit 91e44ba6fc
4 changed files with 222 additions and 3 deletions

View File

@@ -707,3 +707,29 @@ class QueuePipe:
self.send(request)
def setup_thread_excepthook():
"""
Workaround for `sys.excepthook` thread bug from:
http://bugs.python.org/issue1230540
Call once from the main thread before creating any threads.
"""
init_original = threading.Thread.__init__
def init(self, *args, **kwargs):
init_original(self, *args, **kwargs)
run_original = self.run
def run_with_except_hook(*args2, **kwargs2):
try:
run_original(*args2, **kwargs2)
except Exception:
sys.excepthook(*sys.exc_info())
self.run = run_with_except_hook
threading.Thread.__init__ = init