tadded trigger_crash method for testing crash reporter - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 28ca561bba004e4f24b45ba3e680802678581986
DIR parent 94b721baa484972cc360332a4d4ba7b6cb77a2dd
HTML Author: SomberNight <somber.night@protonmail.com>
Date: Thu, 4 Jul 2019 18:06:21 +0200
added trigger_crash method for testing crash reporter
invoke via console as:
electrum.base_crash_reporter.trigger_crash()
Diffstat:
M electrum/base_crash_reporter.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)
---
DIR diff --git a/electrum/base_crash_reporter.py b/electrum/base_crash_reporter.py
t@@ -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()