An `Error` object tracks and reports errors that occur during request handling or middleware execution in a [`Router`]. Errors are collected in a list, and the `occurred` active binding indicates whether any errors have been set.

Format

An [`R6::R6Class`] generator for `Error` objects.

See also

[Middleware], [Router], [handleErrors]

Public fields

errors

Character vector of recorded error messages.

Active bindings

occurred

Logical; `TRUE` if any errors have been recorded.

Methods

Public methods


Method set()

Append an error message to `errors`.

Usage

Error$set(err)

Arguments

err

Error message (coerced to character).


Method clone()

The objects of this class are cloneable with this method.

Usage

Error$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.