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

Bizhawk Client: Display Err #4532

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

PinkSwitch
Copy link
Contributor

What is this fixing or adding?

Causes the Bizhawk client to display an error popup when an Exception is raised, similarly to SNIClient

How was this tested?

I have an in-development APWorld using Bizhawk Client that raises an exception if a version check patched into the rom does not match world's version when the user applies the patch. The error message appeared as expected. I also tested to make sure that the error was still logged correctly, and that a game could still connect and be played.

If this makes graphical changes, please attach screenshots.

image

@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Jan 21, 2025
Comment on lines 239 to 241
except Exception as exc:
logger.exception(exc)
return {}
except Exception as e:
Utils.messagebox('Error', str(e), True)
raise
Copy link
Collaborator

Choose a reason for hiding this comment

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

Even with a message box, I think it's still important for the exception with the full stack trace to go in the text file log.
I don't know whether this raise does that.
Did you make sure the full stack trace still goes in the text file log?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can check that later tonight

@ScipioWright ScipioWright added the is: enhancement Issues requesting new features or pull requests implementing new features. label Jan 21, 2025
worlds/_bizhawk/context.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Zunawe Zunawe left a comment

Choose a reason for hiding this comment

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

Tested with a fake exception, works as expected.

@Zunawe Zunawe added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants