MCPcopy Create free account
hub / github.com/github/gh-aw / Error

Method Error

pkg/workflow/workflow_errors.go:251–265  ·  view source on GitHub ↗

Error returns the aggregated error using errors.Join Returns nil if no errors were collected

()

Source from the content-addressed store, hash-verified

249// Error returns the aggregated error using errors.Join
250// Returns nil if no errors were collected
251func (c *ErrorCollector) Error() error {
252 if len(c.errors) == 0 {
253 return nil
254 }
255
256 if errorAggregationLog.Enabled() {
257 errorAggregationLog.Printf("Aggregating %d errors", len(c.errors))
258 }
259
260 if len(c.errors) == 1 {
261 return c.errors[0]
262 }
263
264 return errors.Join(c.errors...)
265}
266
267// FormattedError returns the aggregated error with a formatted header showing the count
268// Returns nil if no errors were collected

Calls 2

EnabledMethod · 0.45
PrintfMethod · 0.45