Open allencloud opened 6 years ago
Not really. This was a deliberate choice to avoid using the string form of an error to transmit context between locations in the call stack
On 2 Aug 2018, at 02:38, Allen Sun notifications@github.com wrote:
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.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
I want to set error code,and use it in the caller too
Hi, I have a question for the project.
Now there is a line of code :
Then I have a caller
err := A()
, so can I use the returnederr
to getmsg
?Thanks in advance.