MCPcopy Index your code
hub / github.com/cloudfoundry/cli / handleError

Function handleError

util/plugin/plugin.go:94–107  ·  view source on GitHub ↗
(passedErr error, commandUI UI)

Source from the content-addressed store, hash-verified

92}
93
94func handleError(passedErr error, commandUI UI) error {
95 if passedErr == nil {
96 return nil
97 }
98
99 translatedErr := translatableerror.ConvertToTranslatableError(passedErr)
100 commandUI.DisplayError(translatedErr)
101
102 if _, ok := translatedErr.(DisplayUsage); ok {
103 return ParseErr
104 }
105
106 return ErrFailed
107}

Callers 1

RunPluginFunction · 0.70

Calls 2

DisplayErrorMethod · 0.65

Tested by

no test coverage detected