Create error results from a custom exercise evaluator.
exercise_result_error()
is the preferred way to create an error result.
exercise_result_empty()
creates an exercise result representing an "empty" output.
exercise_result_timeout()
is a short-hand version for the common problem of the R code timing out.
exercise_result(
feedback,
html_output,
error_message,
timeout_exceeded = FALSE,
severity
)
exercise_result_error(
error_message,
severity = c("error", "warning", "info"),
timeout_exceeded = FALSE
)
exercise_result_empty(severity)
exercise_result_timeout()
a message to be displayed underneath the code chunk.
the HTML code to be inserted into the exercise's output container.
if present, severity
is set to error
and the error message is used as feedback.
if TRUE
, severity
is set to error
and the timeout error message is shown.
can be one of error
, warning
, or info
.
The function exercise_result_timeout()
uses the correct message configured for the exam (or code chunk).