MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / Err

Method Err

pkg/errorcontext/errorcontext.go:46–53  ·  view source on GitHub ↗

Err returns the err of the ErrorContext if non-nil, or the error of the underlying Context.

()

Source from the content-addressed store, hash-verified

44
45// Err returns the err of the ErrorContext if non-nil, or the error of the underlying Context.
46func (c *ErrorContext) Err() error {
47 c.mu.Lock()
48 defer c.mu.Unlock()
49 if c.err != nil {
50 return c.err
51 }
52 return c.Context.Err()
53}
54
55// New returns a new ErrorContext that extends the parent context
56func New(parent context.Context) (context.Context, CancelFunc) {

Callers 15

TestErrorContextFunction · 0.45
SendMethod · 0.45
TestCodesFunction · 0.45
TestContextCanceledFunction · 0.45
TestResemblesFunction · 0.45
TestDetailsFunction · 0.45
NotifyMethod · 0.45
CloseMethod · 0.45
fromSubscribersMethod · 0.45
StreamMethod · 0.45
subscribeTaskMethod · 0.45

Calls

no outgoing calls

Tested by 6

TestErrorContextFunction · 0.36
TestCodesFunction · 0.36
TestContextCanceledFunction · 0.36
TestResemblesFunction · 0.36
TestDetailsFunction · 0.36