3 ms·
The best part is that you can use Into/From conversion traits and use a different error type all through the call chain. A bunch of functions returning error ty
by akiselev 10y ago
The best part is that you can use Into/From conversion traits and use a different error type all through the call chain. A bunch of functions returning error type A and calling functions with error types B, C, D, and E can all just pass through the errors even though they return a different type. You implement the conversion trait once for each error and then it just works for all functions with no other boilerplate.
- softc 10y agoWith this method, do you have to implement the From trait for every pair of errors that can be propagated up the stack?