Skip to content

[question] Is there a way to get msg from errors.Wrap(code, msg)? #164

Open

Description

@allencloud

Hi, I have a question for the project.

Now there is a line of code :

func A() error{
     return errors.Wrap(code, msg)
}

Then I have a caller err := A(), so can I use the returned err to get msg?

Thanks in advance.

Activity

  1. davecheney commented on Aug 1, 2018

    @davecheney
    Member
  2. gumingqi commented on Jul 29, 2019

    @gumingqi

    I want to set error code,and use it in the caller too

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