util_report_get_data_errors {nhlapi}R Documentation

Report errors encountered during nhl_get_data

Description

Report errors encountered during nhl_get_data

Usage

util_report_get_data_errors(x, reporter = log_e, ...)

Arguments

x

list, results created by nhl_get_data().

reporter

function, used to report the constructed error message, e.g. message, warning, writeLines, etc.

...

further arguments passed to reporter, e.g. con = file("~/log.txt") in case writeLines is the reporter.

Value

character(), URLs for which the retrieval resulted in an error, invisibly. Optional side-effects.

Examples

## Not run: 
  # Write errors to a temporary text file
  tmpFile <- tempfile()
  util_report_get_data_errors(
    nhl_get_data(nhl_url_players(c("none", "8451101", "some"))),
    reporter = writeLines,
    con = tmpFile
  )

## End(Not run)


[Package nhlapi version 0.1.4 Index]