# 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))
Run the code above in your browser using DataLab