errorist_init: Enable or Disable Errorist's Automatic Search

Description Usage Arguments Details Author(s) See Also Examples

Description

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

Usage

1
2
3
4
5
6
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

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

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
### 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()

errorist documentation built on Feb. 24, 2020, 9:07 a.m.