WithCallingHandlers: Error and warning handling

Description Usage Arguments Value Examples

View source: R/mcMap.R

Description

Compared to withCallingHandlers here we return a function which will will execute the desired call with modified calling handlers. This exposes the mechanism used in mcMap to be re-used.

Usage

1
2
3

Arguments

fun

(function) a function

errors

(character) one in c("suppress", "log")

warnings

(character) one in c("suppress", "log", "asError")

warningsWhitelist

(character) a vector of regular expressions for white-listing warnings.

Value

the function fun wrapped in calling handlers.

Examples

1
WithCallingHandlers(function(x) stop("Nooooooo"))()

INWT/mctools documentation built on Sept. 24, 2021, 9:19 p.m.