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

Take it graceful if the icon file cannot be found #177

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lg2de
Copy link

@lg2de lg2de commented Aug 17, 2024

In case the icon cannot be found we should not get a fatal error in the logging.

Addresses #174

@Regenhardt
Copy link

I think this isn't enough. If the case happens where HasEmbeddedIcon is true but no icon is found, there's something more wrong than just a missing icon. Either the database or the file system would be inconsistent, which would be a way bigger problem than just one crashing package download, in which case BaGetter shouldn't just return no icon but prompt people to fix it.

The HasEmbeddedIcon property isn't just used in this one case either. The icon also is displayed as part of the metadata in several places, depending on that property. The data being inconsistent with the files would break those too, even though that probably wouldn't be critical bugs but just display errors. Still errors though.

I would be open to try/catching this error on the web UI though in order to provide actionable information about database and file system being inconsistent. That way the core code, which is in itself consistent, stays like it is, but the error is still caught and (hopefully) fixed.

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