MCPcopy
hub / github.com/cortexlabs/cortex / Wrap

Function Wrap

pkg/lib/errors/error.go:73–85  ·  view source on GitHub ↗
(err error, strs ...string)

Source from the content-addressed store, hash-verified

71}
72
73func Wrap(err error, strs ...string) error {
74 if err == nil {
75 return nil
76 }
77
78 cortexError := WithStack(err).(*Error)
79
80 strs = removeEmptyStrs(strs)
81 strs = append(strs, cortexError.Message)
82 cortexError.Message = strings.Join(strs, ": ")
83
84 return cortexError
85}
86
87func Wrapf(err error, template string, params ...string) error {
88 return Wrap(err, fmt.Sprintf(template, params))

Callers 15

GetClusterStacksFunction · 0.92
cluster_config.goFile · 0.92
validateMethod · 0.92
ValidateOnInstallMethod · 0.92
ValidateOnConfigureMethod · 0.92
validateNodeGroupMethod · 0.92
validateClusterNameFunction · 0.92
CreateDefaultPolicyFunction · 0.92
validateSubnetsMethod · 0.92
ExtractAPIConfigsFunction · 0.92
ValidateAPIFunction · 0.92

Calls 2

WithStackFunction · 0.85
removeEmptyStrsFunction · 0.85

Tested by

no test coverage detected