It's a somewhat common pattern, when an error has a underlying source, to print the error itself, and then print the source error, and so on, recursively, in error messages.
Here's an example of what this looks like in snafu:
Error: Unable to frobnicate the mumbletypeg
Caused by these errors (recent errors listed first):
1: Could not contact the mumbletypeg API
2: The configuration has no password
Because signature::Error both contains a source error, and includes that source error in its display implementation, this can lead to the source error being printed twice, leading to something like this:
Error: signature error: Verification equation was not satisfied
Caused by these errors (recent errors listed first):
1: Verification equation was not satisfied
I think that given the semantics of signature::Error, it probably shouldn't have a source error. A source error is an underlying error which caused the higher level error. In the case of signature::Error, if I'm understanding it correctly, the source error really is the top level error, and not an underlying error which caused it.
It's a somewhat common pattern, when an error has a underlying source, to print the error itself, and then print the source error, and so on, recursively, in error messages.
Here's an example of what this looks like in snafu:
Because
signature::Errorboth contains a source error, and includes that source error in its display implementation, this can lead to the source error being printed twice, leading to something like this:I think that given the semantics of
signature::Error, it probably shouldn't have asourceerror. Asourceerror is an underlying error which caused the higher level error. In the case ofsignature::Error, if I'm understanding it correctly, thesourceerror really is the top level error, and not an underlying error which caused it.