it's useful information, and an unstructured error has no way to safely communicate it
previously these were un-typed errors, so this custom type can be added without breaking backwards compatibility
we want to use it to expose more information about shadow-test failures, which are currently far more opaque than they need to be
Shadow tests are opaque for a lot of reasons that need to be improved, but enhancing the error is a pretty straightforward first step. And it seems useful in general.
This intentionally does not change the .Error() text, largely just because I didn't see any reason to do so. The error strings are reasonably well-known and there doesn't seem to be any major benefit that can be gained by improving them... currently.
That said, these strings must not be considered stable in general, and we should consider changing them in the future.
This is being added for a few reasons:
Shadow tests are opaque for a lot of reasons that need to be improved, but enhancing the error is a pretty straightforward first step. And it seems useful in general.
This intentionally does not change the
.Error()
text, largely just because I didn't see any reason to do so. The error strings are reasonably well-known and there doesn't seem to be any major benefit that can be gained by improving them... currently. That said, these strings must not be considered stable in general, and we should consider changing them in the future.