MCPcopy Create free account
hub / github.com/juju/errors / Mask

Function Mask

functions.go:187–196  ·  view source on GitHub ↗

Mask hides the underlying error type, and records the location of the masking.

(other error)

Source from the content-addressed store, hash-verified

185
186// Mask hides the underlying error type, and records the location of the masking.
187func Mask(other error) error {
188 if other == nil {
189 return nil
190 }
191 err := &Err{
192 previous: other,
193 }
194 err.SetLocation(1)
195 return err
196}
197
198// Cause returns the cause of the given error. This will be either the
199// original error, or the result of a Wrap or Mask call.

Callers 5

TestMaskMethod · 0.92
TestFormatMethod · 0.92
TestAsMethod · 0.92
TestIsMethod · 0.92
TestErrorStringMethod · 0.92

Calls 1

SetLocationMethod · 0.95

Tested by 5

TestMaskMethod · 0.74
TestFormatMethod · 0.74
TestAsMethod · 0.74
TestIsMethod · 0.74
TestErrorStringMethod · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…