Skip to content

Commit

Permalink
Show content of unexpected error
Browse files Browse the repository at this point in the history
  • Loading branch information
xs5871 committed Dec 28, 2023
1 parent 0b7dee9 commit 53399b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kmk/kmk_keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,13 @@ def go(self, hid_type=HIDModes.USB, secondary_hid_type=None, **kwargs) -> None:
try:
while True:
self._main_loop()
except Exception as err:
debug_error(self, 'Unexpected error', err)
finally:
debug('Unexpected error: cleaning up')
debug('cleaning up...')
self._deinit_hid()
self.deinit()
debug('...done')

def _init(
self,
Expand Down

0 comments on commit 53399b0

Please sign in to comment.