-
Notifications
You must be signed in to change notification settings - Fork 618
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
Small improvement: Adjust error messages. #2172
base: main
Are you sure you want to change the base?
Conversation
src/codecs/ico/decoder.rs
Outdated
DecoderError::PngShorterThanHeader => { | ||
f.write_str("Entry specified a length that is shorter than PNG header!") | ||
DecoderError::IcoEntryTooManyPlanesOrHotspot(num_color_planes) => { | ||
f.write_fmt(format_args!("ICO image entry specifies {}, which exceeds the allowed number of color planes or has an invalid hotspot value", num_color_planes)) |
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.
This message is unclear whether the number indicated is how many planes are in the image, or how many hotspots are
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.
Thank you.
I tried to improve it.
Now users at least can know, depending on which file he or she works on.
I'm not very familiar with ICO files. Is there a reason we can't say whether the field is a color planes count or a hotspots count? |
Hello, thank you for your project.
I use it to work with ico files and sometimes error messages don't provide me with full information, which can help.
So, I tried to improve it a bit and add additional information.
I license past and future contributions under the dual MIT/Apache-2.0 license,
allowing licensees to choose either at their option.