Skip to content

Better testing for wrapped errors #1

@decibel

Description

@decibel

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions