MCPcopy
hub / github.com/jesseduffield/lazygit / WrapError

Function WrapError

pkg/utils/errors.go:8–14  ·  view source on GitHub ↗

WrapError wraps an error for the sake of showing a stack trace at the top level the go-errors package, for some reason, does not return nil when you try to wrap a non-error, so we're just doing it here

(err error)

Source from the content-addressed store, hash-verified

6// the go-errors package, for some reason, does not return nil when you try to wrap
7// a non-error, so we're just doing it here
8func WrapError(err error) error {
9 if err == nil {
10 return err
11 }
12
13 return errors.Wrap(err, 0)
14}

Callers 6

NewGitCommandFunction · 0.92
sanitisedCommandOutputFunction · 0.92
AppendLineToFileMethod · 0.92
CreateFileWithContentMethod · 0.92
RemoveMethod · 0.92
onResizeMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected