Open tcharding opened 10 months ago
Hmm, concept ACK 61b6300ad854067c55ef9ce27c3ea3749c74b5c5.
I think in practice this'd be pretty hard to keep in sync with the actual error types. Maybe it should be a collection of unit tests rather than examples?
Its only about the "meaningfulness" of the error messages, I couldn't think of a way to test this except look at it every now and again. Once we are happy I don't think it will matter if some are missed, since devs will tend to copy the error style currently there.
Ok, makes sense.
After running the example all the error messages look great to me except that we should drop code=
on the InvalidChar
message.
Sweet! Thanks for running them.
Do you want this to be merged?
Maybe just leave it here and I'll have a go doing it in another repo, then see if it feels like its worth having. I'm not 100% sure it won't just sit and rot never to be touched again.
Add an
errors
example that creates and prints various error types from the crate. This is useful for two main purposes:Run with appropriate features to verify the output, e.g.,
This example is prone to go stale, is it useful? I could not think of any other way to verify that our error output was good (in both std and no-std environments).