Error {fauxpas}R Documentation

Error class

Description

Error class

Arguments

behavior

Behavior of the error. default: auto. See Details

message_template

A message template. optional. use whisker templating. names to use are: reason and status. use in template like {{reason}} and {{status}}. Note that {{message}} that is used in message_template_verbose will be ignored here.

call.

(logical) indicating if the call should become part of the error message. Default: FALSE

message_template_verbose

A verbose message template. optional. use whisker templating. names to use are: reason, status, message. use in template like {{reason}}, {{status}}, and {{message}}. Note that this is ignored here, but is used in the HTTP* methods (e.g. HTTPBadRequest)

muffle

(logical) whether to not respond when status codes in 1xx-3xx series. Default: FALSE

Details

Methods

behavior parameter options

Of course, you can always override the defaults.

See Also

http, Error-Classes

Examples

Error$new()
# reset behavior
(z <- Error$new())
z$set_behavior("warning")
z

[Package fauxpas version 0.5.2 Index]