safe_callback

0th

Percentile

Generate a safe R callback.

Whenever an R callback function is passed to Rcurl, it needs to be wrapped in this handler which converts errors and interrupts to the appropriate values that cause RCurl to terminate a request

Usage
safe_callback(f)
Arguments
f
A function.
Aliases
  • safe_callback
Examples
f1 <- function(x) {
  if (x < 0) stop("Negative value")
  sqrt(x)
}
f2 <- safe_callback(f1)
f2(-10)
Documentation reproduced from package httr, version 0.6.1, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.