Skip to content
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

Exception wrapping #408

Merged
merged 5 commits into from
Oct 28, 2020
Merged

Conversation

avanwinkle
Copy link
Collaborator

I've been trying to improve the exception handling of MPF/MC as I work—whenever I get a crash that requires me to scroll through the callstack or look in the logs, I update the Exception chain to try and get the meaningful error into the final callstack message.

I think we should do a 50.4 release soon, so making a PR for the changes I've got so far.

@@ -31,6 +31,7 @@ def __init__(self, mc: "MpfMc", config: dict, key: Optional[str] = None, **kwarg
# draws a rectangle using the texture from the loaded image asset to
# display the image. Scaling and rotation is handled by the Scatter
# widget.
image = None
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this line so the exception handler down below won't throw a different exception on image being undefined.

@jabdoa2
Copy link
Collaborator

jabdoa2 commented Oct 26, 2020

Nice

@avanwinkle avanwinkle merged commit b2a6d7b into missionpinball:dev Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants