Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mizaki
Copy link
Contributor

@mizaki mizaki commented Feb 28, 2025

Could also change to debug or pass it?

Fixes #732

@lordwelch
Copy link
Member

I don't understand why you want this. This just changes what gets logged no functionality changes and now we don't get a stack trace

@mizaki
Copy link
Contributor Author

mizaki commented Feb 28, 2025

The problem is it will try to load empty bytes.

The proper fix then is probably to test for 0 bytes first?

@mizaki
Copy link
Contributor Author

mizaki commented Feb 28, 2025

It doesn't crash CT out but you get the log as in #732 which to my mind, isn't a real exception.

Should 0 bytes not get that far? It seems like a reasonable check to do though?

@lordwelch
Copy link
Member

Here I think it is an exception, callers should check that they are sending non empty bytes. You can put a check in to log it with a proper message but it should still be logged as an error

@mizaki
Copy link
Contributor Author

mizaki commented Feb 28, 2025

Added the size to the logger message. Hopefully that should be enough to not go chasing ghosts.

@lordwelch
Copy link
Member

Instead put a check at the beginning to return early and log that an empty image was provided

@mizaki
Copy link
Contributor Author

mizaki commented Mar 20, 2025

Ready for merge?

@lordwelch lordwelch merged commit 3965bfe into comictagger:develop Mar 23, 2025
6 checks passed
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.

CoverWidget exception with empty data

2 participants