akavel / rsrc

Tool for embedding .ico & manifest resources in Go programs for Windows.
MIT License
1.22k stars 122 forks source link

More detailed error messages (use xerrors and "%w") #37

Open akavel opened 3 years ago

akavel commented 3 years ago

The error that showed up in #35 was confusing enough that even I wasn't sure where it comes from. If the message gave more details (like maybe at least: "error: reading .ico file: bad magic number"), this could potentially be already enough for the reporter to get a hint at how to resolve the issue (as they did once they learnt what it's about).

[Later in the future, possibly some extra hint messages could be added in some cases, like in #35 in particular rsrc could show a hint like: "Hint: Have you maybe renamed a .png file to .ico? If yes, this unfortunately won't work, you need to use a proper converter."]