Trigger Restart for Skipping Transformation
Source:R/SeaSondeRCS.R
seasonder_v6_skip_transformation.Rd
This function provides a mechanism to invoke a restart during the reading and transformation process of the SeaSonde CS File Version 6 header. It allows users to skip transformations that may have caused errors and proceed with a provided value.
Details
This function specifically triggers the seasonder_v6_skip_transformation
restart
that allows for skipping a block transformation in the reading process of the
SeaSonde CS File Version 6 header. When triggered, it logs an error message,
skips the problematic transformation, and returns the provided value for the block.
Integration with SeaSonde CS File Reading
The restart mechanism of this function is integrated within the
seasonder_readSeaSondeCSFileHeaderV6
function. If an error occurs during
the transformation process of a specific block, the restart provides users with
an option to skip the problematic transformation and proceed with a fallback value.
Examples
# Example: Skip transformation using a restart handler
res <- withRestarts(
seasonder_v6_skip_transformation(simpleError("test error"), "default"),
seasonder_v6_skip_transformation = function(cond, value) value
)
print(res)
#> [1] "default"