get_breadcrumbs: Get Breadcrumbs.

Description Usage Arguments Details Value See Also Examples

View source: R/breadcrumbs.R

Description

Get breadcrumbs and output a message.

Usage

1
get_breadcrumbs(void, verbose = TRUE)

Arguments

void

Any object. Not used.

verbose

A flag. Should a message be outputted?

Details

Breadcrumbs allow to keep track of locations within modules. This is particularily useful to circumvent an error occurring in a chain of nested dependent modules, for instance. See reactivate_breadcrumbs.

Value

An ordered character vector containing the names of the nested modules.

See Also

reactivate_breadcrumbs, define, make, and reset.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
reset()
define("foo", NULL, function() function() get_breadcrumbs())
define("bar", list(foo = "foo"), function(foo) function() foo())
define("foobar", list(bar = "bar"), function(bar) (bar()))
make()

reset()
reactivate_breadcrumbs()
define("foo", NULL, function() function() stop("error in 'foo'"))
define("bar", list(foo = "foo"), function(foo) function() foo())
define("foobar", list(bar = "bar"), function(bar) bar())
## Not run: make()

openscienceunil/modulr documentation built on May 3, 2019, 5:49 p.m.