pytransitions / transitions

A lightweight, object-oriented finite state machine implementation in Python with many extensions
MIT License
5.49k stars 525 forks source link

"on_exception" is not invoked for "KeyboardInterrupt" #619

Closed aleneum closed 1 month ago

aleneum commented 1 year ago

Catch BaseException instead of Exception during state transition. Even though user user exceptions should be derived from Exception [1], some exceptions such as KeyboardInterrupt are not. I do not see an imminent problem with doing this switch.

Discussed in https://github.com/pytransitions/transitions/discussions/618