-
Notifications
You must be signed in to change notification settings - Fork 131
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
mia, desktop-ui: Add basic error handling to ROM loading #1785
base: master
Are you sure you want to change the base?
Conversation
Move LoadResult to ares.hpp, handle modal cancellation handle firmware errors more gooder, add invalid rom error
Since most of these errors are regarding ROM loading and manifest parsing; which mia is responsible for creating/handling; I believe these error types would be better suited as part of mia.hpp. |
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.
Just a few notes
Taking this out of draft now that it's in a better state. Line 12 in 90860c2
I am still not 100% on if this is correct/representative of the underlying behavior. Arcade seems to be the only system with an existing failure condition here. It seems like it's bailing out if the game entry wasn't in the database rather than using heuristics like the other cores. Just want to make sure this is accurate. And if so, maybe a more descriptive error message is appropriate? "The selected [game/Arcade system] is not currently supported by ares"? |
This is indeed correct; due to how arcade roms are formatted, ares does not know how to load them without a database entry specifying which individual roms need to be loaded where. |
Note
Seeking testers on this to validate that errors appear correctly, are accurate, and we didn't break anything.
Description
Adds the
LoadResult
type, used to identify and propagate upwards errors encountered when loading ROMs and systems.Modifies the
mia
anddesktop-ui
load routines to use this type instead of generic booleans, so that if we have a load failure, we can propagate a precise and useful error to the user rather than a vague and possibly mismatched one.Currently the scope of the error handling is just
mia
anddesktop-ui
; errors encountered when loading inares
itself are currently generic "otherError
"s.LoadResult
is placed inmia/mia.hpp
so it is accessible to bothmia
anddesktop-ui
. If LoadResult is added to ares loading in the future, the LoadResult type may need to be moved.