3 ms·
That's only the case when your per-function error sets are "flat" (directly contain "leaf" errors from many layers below). You can avoid this issue if you deep
by Expurple 1y ago
That's only the case when your per-function error sets are "flat" (directly contain "leaf" errors from many layers below).
You can avoid this issue if you deeply nest the error types (wrap on every level). It you change an error that's not deeply-matched anywhere, you only need to update the direct callers. But "deep" errors have some tradeoffs [1] too
[1]: https://news.ycombinator.com/item?id=44420061 https://news.ycombinator.com/item?id=44420061