electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 28ca561bba004e4f24b45ba3e680802678581986
parent 94b721baa484972cc360332a4d4ba7b6cb77a2dd
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:
Melectrum/base_crash_reporter.py | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/electrum/base_crash_reporter.py b/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()