headers icon indicating copy to clipboard operation
headers copied to clipboard

Allow setting an explanatory string on the Error struct

Open wolfv opened this issue 2 years ago • 0 comments

I was trying to add some explanation on why header parsing fails to a custom typed header and couldn't do so because the error class doesn't have a way to add additional information.

I was thinking one could change the invalid signature to Error::invalid(Option<String>) so that a custom error message could be optionally added when parsing fails?

Would love to hear thoughts on this.

wolfv avatar Jan 26 '23 13:01 wolfv