View source: R/error-handling.R
handle_event_error | R Documentation |
An error caught during event handling must be handled in a special way. An error message must be logged and posted to the invocation error endpoint, and the the runtime must continue — an invocation error is a problem for the invocation, not the runtime.
The handle_event_error
function accepts an event and generates a
function. The generated function accepts error caught by
tryCatch
, logs it, and then submits it to the invocation
error endpoint. Importantly it does not stop the kernel — the intention is
that the runtime moves onto the next event.
This function may need to be implemented differently depending on the source
of an event. As such, handle_event_error
is an S3 generic that can dispatch
on the event class as returned by classify_event
.
tryCatch( handle_event(...), error = handle_invocation_error(event) # returns a function(e) )
handle_event_error(event, config, ...)
A function that accepts an error e
as caught by
tryCatch
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.