You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log.error("Failed to invoke `workflow.onComplete` event handler", e)
}
}
This also affects the error() function, which throws a WorkflowScriptErrorException under the hood. Throwing an exception is a useful way to fail the entire run if some final validation does not succeed.
On the other hand, if some unexpected exception is thrown, the current logic prevents the entire run from failing, which can be nice.
A good solution might be to re-throw WorkflowScriptErrorException but catch and log all others.
The text was updated successfully, but these errors were encountered:
Slack thread: https://nextflow.slack.com/archives/C02T98A23U7/p1696364290193959
Exceptions can't be thrown from the workflow onComplete handler because they are immediately caught by Nextflow and logged as an error:
nextflow/modules/nextflow/src/main/groovy/nextflow/script/WorkflowMetadata.groovy
Lines 391 to 398 in dfb5bf0
This also affects the
error()
function, which throws aWorkflowScriptErrorException
under the hood. Throwing an exception is a useful way to fail the entire run if some final validation does not succeed.On the other hand, if some unexpected exception is thrown, the current logic prevents the entire run from failing, which can be nice.
A good solution might be to re-throw
WorkflowScriptErrorException
but catch and log all others.The text was updated successfully, but these errors were encountered: