Browse Source
added trigger_crash method for testing crash reporter
invoke via console as:
electrum.base_crash_reporter.trigger_crash()
dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
SomberNight
6 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
17 additions and
0 deletions
-
electrum/base_crash_reporter.py
|
|
@ -131,3 +131,20 @@ class BaseCrashReporter(Logger): |
|
|
|
|
|
|
|
def get_wallet_type(self): |
|
|
|
raise NotImplementedError |
|
|
|
|
|
|
|
|
|
|
|
def trigger_crash(): |
|
|
|
# note: do not change the type of the exception, the message, |
|
|
|
# or the name of this method. All reports generated through this |
|
|
|
# method will be grouped together by the crash reporter, and thus |
|
|
|
# don't spam the issue tracker. |
|
|
|
|
|
|
|
class TestingException(Exception): |
|
|
|
pass |
|
|
|
|
|
|
|
def crash_test(): |
|
|
|
raise TestingException("triggered crash for testing purposes") |
|
|
|
|
|
|
|
import threading |
|
|
|
t = threading.Thread(target=crash_test) |
|
|
|
t.start() |
|
|
|