Print sources for errors in RetryError
Fixes #958 (closed)
I think this has come out very nicely.
Things that may be controversial and ought to be considered:
-
Is
retry-error
the right place forfmt_error_with_sources
? Arguably not, because it's really nothing to do with retries. But we don't have a better place to put it;retry-error
ought not to depend ontor-error
, I think. If we come up with a more-fundamental place, thenretry-error
could re-export it with#[doc(hidden)]
etc., so I think this is an OK thing to do to the API now. -
Whether
RetryError
ought to print sources at all. Discussion: #958 (comment 2922760) et seq. As I write there, I'm fairly convinced that it should, at least pending some more substantial overhaul.
With this MR, the example error in #958 (closed) looks like the desired-by-me output as I show here: #958 (comment 2922761)