nextflow-io / nextflow-io/nextflow

Error message control

Open
#725 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lang/processes stale
Dominant language
Groovy
Stars
3.5k
Forks
811
Avg merge
2d 11h
Merged PRs (30d)
61

Description

I would like to have a feature to allow me to control precisely what the error message is if something fails, suppressing the normal NextFlow error message and stack track.

Sometime the workflow runs into an error because of some problem with the data and I want to print a clear error message to the user to explain the problem and how to fix it. However, the normal error message is very verbose and for someone who is not the developer of the workflow very confusing. This is particularly the case when the script being run in a template where the whole templatised code gets dumped out as the "script".

What I'd want is a directive like

errorMessage 45 "pheno_err_msg.py $fname"

which would mean "if any step in the script returns errror code 45, call the script bin/pheno_err_msg.py"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the proposed errorMessage directive and the example bin/pheno_err_msg.py handler. Define how an exit code such as 45 selects the handler, how $fname is passed, and how the normal Nextflow error message and stack trace are suppressed. Done means a workflow can provide a clear custom message for the failing data case.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.