logoalt Hacker News

ViewTrick1002yesterday at 11:51 PM1 replyview on HN

How come you get macro expansion errors? Or is it because you write incorrect syntax in the enum error definitions?

The example on the docs page is quite clear:

https://docs.rs/thiserror/latest/thiserror/#example

Including all kinds of errors: Strings, tagged unions and automatically converting from std::io::Error with added context.

That one page document is the entire documentation for the thiserror crate.


Replies

throwaway894345today at 2:33 AM

It’s been a while, I don’t remember the details, but it wasn’t syntax errors.