From 54e04423abfc26d988e46ef6181b66d5f4246e3d Mon Sep 17 00:00:00 2001 From: jorgee Date: Tue, 22 Oct 2024 16:55:11 +0200 Subject: [PATCH] update documentation and test with previous exception Signed-off-by: jorgee --- docs/reference/process.md | 6 +++--- tests/checks/trace-access.nf/.checks | 2 +- tests/trace-access.nf | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/reference/process.md b/docs/reference/process.md index 0df86a6fa7..843729589b 100644 --- a/docs/reference/process.md +++ b/docs/reference/process.md @@ -26,11 +26,11 @@ The following task properties are defined in the process body: : *Available only in `exec:` blocks* : The current task name. -`task.previousError` +`task.previousException` : :::{versionadded} 24.10.0 ::: -: The error message of the task execution. -: Since the error message is only available after the task has been executed, it can only be used when `task.attempt` is bigger than 1. +: The task execution of previous execution. +: Since the exception is only available after the task has been executed, it can only be used when `task.attempt` is bigger than 1. `task.previousTrace` : :::{versionadded} 24.10.0 diff --git a/tests/checks/trace-access.nf/.checks b/tests/checks/trace-access.nf/.checks index a074e19435..887f37fd3b 100644 --- a/tests/checks/trace-access.nf/.checks +++ b/tests/checks/trace-access.nf/.checks @@ -6,6 +6,6 @@ $NXF_RUN | tee stdout [[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo'` == 1 ]] || false [[ `grep 'INFO' .nextflow.log | grep -c 'Re-submitted process > foo'` == 3 ]] || false -[[ `grep -c 'mem: 8 GB (previous: 4294967296) (error: Process .* terminated with an error exit status (137))' stdout` == 1 ]] || false +[[ `grep -c 'mem: 8 GB (previous: 4294967296) (error: nextflow.exception.ProcessFailedException: Process .* terminated with an error exit status (137))' stdout` == 1 ]] || false diff --git a/tests/trace-access.nf b/tests/trace-access.nf index af585175bb..ff55dbdb84 100644 --- a/tests/trace-access.nf +++ b/tests/trace-access.nf @@ -13,7 +13,7 @@ process foo { """ } else { """ - echo 'mem: $task.memory (previous: $task.previousTrace.memory) (error: $task.previousError)' + echo 'mem: $task.memory (previous: $task.previousTrace.memory) (error: $task.previousException)' exit 0 """ }