MCPcopy Create free account
hub / github.com/google/go-cloud / wrapError

Function wrapError

runtimevar/runtimevar.go:322–330  ·  view source on GitHub ↗
(w driver.Watcher, err error)

Source from the content-addressed store, hash-verified

320}
321
322func wrapError(w driver.Watcher, err error) error {
323 if err == nil {
324 return nil
325 }
326 if gcerr.DoNotWrap(err) {
327 return err
328 }
329 return gcerr.New(w.ErrorCode(err), err, 2, "runtimevar")
330}
331
332// ErrorAs converts err to driver-specific types.
333// ErrorAs panics if i is nil or not a pointer.

Callers 2

backgroundMethod · 0.70
CloseMethod · 0.70

Calls 3

DoNotWrapFunction · 0.92
NewFunction · 0.92
ErrorCodeMethod · 0.65

Tested by

no test coverage detected