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

Do not reset on minor state load errors #623

Merged
merged 1 commit into from Feb 23, 2019

Conversation

Projects
None yet
2 participants
@rzumer
Copy link
Contributor

rzumer commented Feb 22, 2019

The state load function resets the machine too aggressively in my opinion. Occasionally I press F12 instead of F11 to save a state, and after specifying an invalid file name get an error and the system resets, despite no configuration being set. For those minor errors that occur at the start of the state load process, instead of throwing an exception, this displays the error message and cancels the state load.

@tomcw tomcw merged commit 11137cb into AppleWin:master Feb 23, 2019

@tomcw

This comment has been minimized.

Copy link
Contributor

tomcw commented Feb 23, 2019

Thanks for the PR.

tomcw added a commit that referenced this pull request Feb 24, 2019

@tomcw

This comment has been minimized.

Copy link
Contributor

tomcw commented Feb 24, 2019

I've changed the patch to something simpler and IMO more consistent.

Details: InitParser() and ParseFileHdr() can both throw. So we had this odd mix of throw (and restart) or no-throw (and no restart). The restart doesn't need to happen in either case.

So I've reverted to nearly what the code was before, but added a bool to control whether to restart or not.

@rzumer

This comment has been minimized.

Copy link
Contributor Author

rzumer commented Feb 24, 2019

Seems good, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.