Skip to content

Question: Obtaining the original cause #138

Description

@johngb

I have been using this package for a while now without any problems (I love it). However, today I came across a behaviour in my code that I can't understand when trying compare the result of errors.Cause with a named error. I've read through the documentation, and I came across the following statement:

Depending on the nature of the error it may be necessary to reverse the operation of errors.Wrap to retrieve the original error for inspection.

  1. In which situations is it necessary to reverse the operation of errors.Wrap to inspect the original error?
  2. How does one reverse the operation of errors.Wrap to obtain the original error?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions