-
-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create an enum for valid device rotations #4125
base: main
Are you sure you want to change the base?
Conversation
label = TR.rotation__west | ||
else: | ||
raise DataError("Unsupported display rotation") | ||
raise ValueError(f"Unsupported display rotation: {rotation}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a RuntimeError
here, this cannot happen because your if/elif is exhaustive
also don't use generic errors with texts https://docs.trezor.io/trezor-firmware/core/misc/exceptions.html
dtto below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5d07343
to
7694c74
Compare
fixes #4041