setDreamerr_show_stack | R Documentation |
Errors generated with dreamerr functions only shows the call to which
the error should point to. If setDreamerr_show_stack
is set to TRUE,
error will display the full call stack instead.
setDreamerr_show_stack(show_full_stack = FALSE)
show_full_stack |
Logical scalar, default is |
Laurent Berge
# Let's create a toy example of a function relying on an internal function
# for the heavy lifting (although here it's pretty light!)
make_sum = function(a, b){
make_sum_internal(a, b)
}
make_sum_internal = function(a, b){
if(!is.numeric(a)) stop_up("arg. 'a' must be numeric!")
a + b
}
# By default if you feed stg non numeric, the call shown is
# make_sum, and not make_sum_internal, since the user could not
# care less of the internal structure of your functions
try(make_sum("five", 55))
# Now with setDreamerr_show_stack(TRUE), you would get the full call stack
setDreamerr_show_stack(TRUE)
try(make_sum("five", 55))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.