In my tests, I'd like to be able to assert that an error being returned from a function at least implements Causer. It would also be nice to verify where the call was actually wrapped from.
I'm wondering how that functionality might be added...
Semi-related, it seems that Expect(err1).To(MatchWrappedError(err2)) will fail if err1 is wrapped but err2 is a plain error... but isn't that rather pointless since MatchError() will fail in that case as well? Wouldn't it be more useful to verify that err1 is wrapping err2?
In my tests, I'd like to be able to assert that an error being returned from a function at least implements Causer. It would also be nice to verify where the call was actually wrapped from.
I'm wondering how that functionality might be added...
Semi-related, it seems that Expect(err1).To(MatchWrappedError(err2)) will fail if err1 is wrapped but err2 is a plain error... but isn't that rather pointless since MatchError() will fail in that case as well? Wouldn't it be more useful to verify that err1 is wrapping err2?