Error | R Documentation |
Error class
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 |
call. |
(logical) indicating if the call should become part
of the error message. Default: |
message_template_verbose |
A verbose message template. optional.
use whisker templating. names to use are: reason, status, message.
use in template like |
muffle |
(logical) whether to not respond when status codes
in 1xx-3xx series. Default: |
Methods
do(response, mssg)
Execute condition, whether it be message, warning, or error.
response: is any response from crul, curl, or httr
Execute condition, whether it be message, warning, error, or your
own custom function. This method uses message_template_verbose
,
and uses it's default value.
mssg: character string message to include in call. ignored if
template does not have a message
entry
set_behavior(behavior)
Set behavior, same as setting behavior on initializing with $new()
stop - use stop
warning - use warning
message - use message
auto - toggle between stop
and message
depending
on the HTTP status code series. Defaults will be:
1xx: message
2xx: message
3xx: message
4xx: stop
5xx: stop
Of course, you can always override the defaults.
http
, Error-Classes
Error$new()
# reset behavior
(z <- Error$new())
z$set_behavior("warning")
z
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.