errorist_init: Enable or Disable Errorist's Automatic Search

enable_erroristR Documentation

Enable or Disable Errorist's Automatic Search

Description

Activates or disengages the automatic look up of error or warning codes in R.

Usage

enable_errorist(
  error_search_func = getOption("errorist.warning", searcher::search_google),
  warning_search_func = getOption("errorist.warning", searcher::search_google)
)

disable_errorist()

Arguments

error_search_func, warning_search_func

The search function from searcher that should be called when an error or warning occurs. By default, searches are routed through Google.

Details

The enable_errorist() is automatically called on package start to inject handlers for warnings and errors. When the package is unloaded, disable_errorist() is called to remove warnings and errors. If you wish to disable warnings or error individually, please use either disable_error_shim() or disable_warning_shim().

Author(s)

James Joseph Balamuta

See Also

enable_error_shim(), enable_warning_shim(), disable_error_shim(), disable_warning_shim()

Examples


### Default search engine is Google

# Enable automatic search
# NB: This is done automatically on package load.
enable_errorist()

# Some code ...

# Disable automatic search
# NB: This is done automatically on package unload via "detach()"
disable_errorist()

#### Custom search engines

# Enable automatic search with custom search engines
# NB: This is done automatically on package load.
enable_errorist(error_search_func   = searcher::search_bing,
                warning_search_func = searcher::search_duckduckgo)

# Some code ...

# Disable automatic search
# NB: This is done automatically on package unload via "detach()"
disable_errorist()

coatless/errorist documentation built on Nov. 16, 2023, 9:45 p.m.