debug.error.trace: Warnings and errors

Description Usage Arguments Value Examples

Description

This function will trace the lineage of an error message, returning the lines that led up to a script stopping

This function shows the lineage of the warning messages in a script

Usage

1
2
3
debug.error.trace(stack.overflow = F)

debug.warning.trace(..., stack.overflow = F)

Arguments

stack.overflow

Determines whether or not the error message should be searched for automatically on stack overflow

...

A number representing the error message the function should return. To see the possibilities call the function with no argument passed

Value

Debug.error: Returns a data frame with all the lines that led to an error's creation

Debug.warning: Returns one of two things. If no parameters were passed to the function then a list of possible warnings will be returned. The number next to the warning is the number that should be passed to grab that lineage. If variables were passed to the function then a list of data frames is returned. Each data frame corresponds to one of the warnings.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
debug.init("example.R")
debug.error.trace()
debug.error.trace(stack.overflow = T) # Not currently supported

## End(Not run)
## Not run: 
debug.init("example.R")
debug.warning.trace() # returns a list of possible warnings
debug.warning.trace(1, 4) # returns warnings 1 and 4
debug.warning.trace(1:4, 7) # returns warnings 1 through 4 and 7

## End(Not run)

jwons/provDebugR documentation built on May 3, 2019, 3:40 p.m.