Skip to content

How can i handle multiple errors from Parallel execution #7

@Kirhchoff

Description

@Kirhchoff

I can't seem to figure out how to handle multiple errors occurring in parallel.

func fail(msg string) floc.Job {
	return func(ctx floc.Context, ctrl floc.Control) error {
		return errors.New("error " + msg)
	}
}

flow := run.Parallel(fail("asd"), fail("qwe"))
result, data, err := floc.Run(flow)

The err only contains one of the errors as far as I can tell. Seems like there is an ErrMultiple type, but I don't know how to use it.

Thank you for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions