Add exception handler test

This commit is contained in:
Mykola Grymalyuk
2023-05-27 12:44:10 -06:00
parent 79f6754c4f
commit bad9dbaecc

View File

@@ -824,6 +824,12 @@ class SettingsFrame(wx.Frame):
"Check CHANGELOG before blindly updating.",
],
},
"Trigger Exception": {
"type": "button",
"function": self.on_test_exception,
"description": [
],
},
"wrap_around 1": {
"type": "wrap_around",
},
@@ -1266,4 +1272,8 @@ Hardware Information:
pathname = fileDialog.GetPath()
logging.info(f"Saving constants to {pathname}")
with open(pathname, 'w') as file:
file.write(pprint.pformat(vars(self.constants), indent=4))
file.write(pprint.pformat(vars(self.constants), indent=4))
def on_test_exception(self, event: wx.Event) -> None:
raise Exception("Test Exception")