From bad9dbaecc35a15fd6447242994532fbd07f9cce Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sat, 27 May 2023 12:44:10 -0600 Subject: [PATCH] Add exception handler test --- resources/wx_gui/gui_settings.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/resources/wx_gui/gui_settings.py b/resources/wx_gui/gui_settings.py index ee1c47275..21dd8a6e1 100644 --- a/resources/wx_gui/gui_settings.py +++ b/resources/wx_gui/gui_settings.py @@ -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)) \ No newline at end of file + file.write(pprint.pformat(vars(self.constants), indent=4)) + + + def on_test_exception(self, event: wx.Event) -> None: + raise Exception("Test Exception") \ No newline at end of file