R/Rtry_error.R

Defines functions Rtry_error

Rtry_error <- function(fun) {
    tryCatch(
        expr = {
            fun
        },
        error = function(cond) {
            # message(paste("URL could not be parsed\n"))
            return(NA)
        },
        warning = function(cond) {
            # message(paste("Value caused a warning\n"))
        },
        finally = {}
    )
}
EccRiley/Riley documentation built on Feb. 15, 2024, 9:29 a.m.