Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds example of error strategies to documentation #5121

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1684,6 +1684,15 @@ process ignoreAnyError {
By definition, a command script fails when it ends with a non-zero exit status.
:::

:::{tip}
To illustrate the differences between error strategies, it can be helpful to imagine an example. Let's say you are analysing 96 patient samples, however the data from one is corrupted and will fail. If you try to analyse these samples with a pipeline written in Nextflow, here is the behaviour when using the following strategies when the process for the corrupted file fails:

- `terminate`: Nextflow will cancel any existing processes and exit the pipeline and report an error
- `finish`: Nextflow will allow any existing jobs to conclude but not submit any more and report an error
- `ignore`: Nextflow will proceed to continue submitting processes for the remaining 95 samples and proceed to completion. Nextflow will ignore the error and report a successful pipeline completion
- `ignore` and `workflow.failOnIgnore`: Nextflow will proceed to continue submitting processes for the remaining 95 samples and proceed to completion, then exit with an error status and report the error
:::

The `retry` error strategy allows you to re-submit for execution a process returning an error condition. For example:

```groovy
Expand Down
Loading