Provides a structured restart mechanism to rerun the quality control (QC) function
with an alternative function during the execution of read_and_qc_field
.
This allows for a flexible error recovery strategy when the initial QC function fails
or is deemed inadequate.
Details
This function is meant to be used within custom condition handlers for the
read_and_qc_field
function.
Examples
# Example (expected to error due to missing restart):
val <- try(
seasonder_rerun_qc_with_fun(
list(seasonder_value = 42),
function(x) x * 2
),
silent = TRUE
)
print(val)
#> [1] "Error in invokeRestart(\"seasonder_rerun_qc_with_fun\", cond, qc_fun) : \n no 'restart' 'seasonder_rerun_qc_with_fun' found\n"
#> attr(,"class")
#> [1] "try-error"
#> attr(,"condition")
#> <simpleError in invokeRestart("seasonder_rerun_qc_with_fun", cond, qc_fun): no 'restart' 'seasonder_rerun_qc_with_fun' found>