Errors signalled by rtemis are classed R conditions, so they can be
handled selectively with tryCatch() or withCallingHandlers() rather than
matched by message text. Each error carries a class vector ordered from the
most specific failure mode to the most general, so a handler can catch
narrowly (e.g. only type errors) or broadly (e.g. any invalid input).
Every rtemis error inherits, in order: its specific class (when applicable),
its category class, and finally "rtemis_error", "error", "condition".
Catching rtemis_error therefore catches all rtemis errors.
Value
Not applicable. This page documents the condition classes; the functions that signal them do not return when they error.
Categories and specific classes
rtemis_input_error
A function argument supplied by the caller is invalid. Specific classes:
rtemis_type_errorArgument is of the wrong type or class.
rtemis_value_errorArgument has a disallowed value or choice.
rtemis_length_errorArgument has the wrong length or count.
rtemis_range_errorArgument is outside its allowed range.
rtemis_null_inputA required argument is
NULLor empty.
rtemis_data_error
The supplied dataset is unsuitable for the requested operation. Specific classes:
rtemis_dim_errorData has the wrong dimensions (e.g. too few columns).
rtemis_level_mismatchFactor levels do not match across data splits.
rtemis_missing_dataData contains missing values where none are allowed.
rtemis_outcome_errorThe outcome column has an invalid or mismatched type.
rtemis_io_error
A filesystem operation failed. Specific classes:
rtemis_file_not_foundA path or file does not exist.
rtemis_file_existsA file already exists and overwriting was not permitted.
Examples
# Every rtemis error inherits `rtemis_error`. Catch a category broadly:
result <- tryCatch(
set_outcome(iris, "nonexistent_column"),
rtemis_input_error = function(e) {
message("Caught an input error: ", conditionMessage(e))
NULL
}
)
#> 2026-08-09 13:22:42
#> ✖ rtemis_value_error
#> [set_outcome]
#> Caught an input error: Column "nonexistent_column" not found in data.
# Or catch a specific failure mode only:
result <- tryCatch(
set_outcome(iris, "nonexistent_column"),
rtemis_value_error = function(e) {
message("Caught a value error: ", conditionMessage(e))
NULL
}
)
#> 2026-08-09 13:22:42
#> ✖ rtemis_value_error
#> [set_outcome]
#> Caught a value error: Column "nonexistent_column" not found in data.