Docs: Error handling guidelines
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 98
- Forks
- 298
- Avg merge
- 14h 38m
- Merged PRs (30d)
- 38
Description
Is your feature request related to a problem? Please describe.
Need clear guidelines when to use error handling, and how to implement them.
There are several methods one could use.
- Nextflow
errorfunction. - Groovy
assert(assert <boolean> : <error_message_if_false). - Groovy
Exception(throw new Exception("Error message")). - Nextflow
log.error+system.exit(1). - Nextflow
exit <exitcode>, <message>
Describe the solution you'd like
Need docs describing when to include error handling, e.g. https://github.com/nf-core/modules/blob/e20e57f90b6787ac9a010a980cf6ea98bd990046/modules/lima/main.nf#L37 includes error handing for identically named input and output files.
https://github.com/nf-core/modules/blob/62da45b0e1202677a07e2da0ee9f6181466232fb/modules/deepvariant/main.nf#L7 for how to deal with no conda environment.
Modules:
- Let the tool handle the error message if it can.
- If it cannot, implement error handling with
error.
Pipelines:
- Use
errorto report an error.
The Nextflow function error prints the message to both log and screen, and exits.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the linked modules/lima/main.nf and modules/deepvariant/main.nf examples, along with the listed Nextflow and Groovy error-handling methods. Done means publishing documentation that explains when modules and pipelines should use each approach, including the stated tool-handling and error-function guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100