add_error_handler | R Documentation |
Registers an error handler in the Dispatcher
.
add_error_handler(callback)
callback |
A function that takes |
You can also use add_handler
to register error handlers
if the handler is of type ErrorHandler
.
## Not run: updater <- Updater(token = "TOKEN") # Create error callback error_callback <- function(bot, error) { warning(simpleWarning(conditionMessage(error), call = "Updates polling")) } # Register it to the updater's dispatcher updater$dispatcher$add_error_handler(error_callback) # or updater$dispatcher$add_handler(ErrorHandler(error_callback)) # or updater <- updater + ErrorHandler(error_callback) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.