MCPcopy Create free account
hub / github.com/cloudfoundry/bosh-agent / summarizeErrs

Method summarizeErrs

agent/script/parallel_script.go:98–112  ·  view source on GitHub ↗
(passedScripts, failedScripts []string)

Source from the content-addressed store, hash-verified

96}
97
98func (s ParallelScript) summarizeErrs(passedScripts, failedScripts []string) error {
99 if len(failedScripts) > 0 {
100 errMsg := "Failed Jobs: " + strings.Join(failedScripts, ", ")
101
102 if len(passedScripts) > 0 {
103 errMsg += ". Successful Jobs: " + strings.Join(passedScripts, ", ")
104 }
105
106 totalRan := len(passedScripts) + len(failedScripts)
107
108 return bosherr.Errorf("%d of %d %s scripts failed. %s.", len(failedScripts), totalRan, s.name, errMsg)
109 }
110
111 return nil
112}

Callers 1

RunMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected