[1]: https://doc.rust-lang.org/rust-by-example/error/multiple_err...
[1]: https://doc.rust-lang.org/rust-by-example/error/multiple_err...
> I now think you should either expose only a string message your user can just show their end user or an error that's much more specific so they can write code that intelligently responds to it.
a boxed trait object is the main way to implement an error that merely conveys a string message.
Edit: Realized it might not have been clear that "boxed error" and "all you get are a string message" refer to the same thing. While you can try and convert a trait object to a specific type at runtime it's a crude and ugly approach that suggests that trait object should have been something else to start with. The main thing you do with a Box<dyn Error> is ask it for a Display message.