Skip to content

Commit

Permalink
added trigger_crash method for testing crash reporter
Browse files Browse the repository at this point in the history
invoke via console as:
electrum.base_crash_reporter.trigger_crash()
  • Loading branch information
SomberNight committed Jul 4, 2019
1 parent 94b721b commit 28ca561
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions electrum/base_crash_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,20 @@ def get_user_description(self):

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()

0 comments on commit 28ca561

Please sign in to comment.