formattedFrame {tinytest2JUnit}R Documentation

Help function to generate the formatted string for a single stack frame.

Description

Help function to generate the formatted string for a single stack frame.

Usage

formattedFrame(framecall, frameN, hasSrcInfo, dirName, fileName, lineNr)

Arguments

framecall

character(n): deparsed call for the given stack. Each element corresponds to a line.

frameN

integer(1): frame nummer.

hasSrcInfo

logical(1): Does the call have any source info?

dirName

character(1): the directory name of the source file.

fileName

character(1): filename of the source. Value ignored if hasSrcInfo=TRUE.

lineNr

character(1): linenr in the source where the call occured.. Value ignored if hasSrcInfo=TRUE.

Details

For a given frame in the stack the string is formatted as follows (substitute the arguments between the curly braces) {frameN}| {call[1]} {frameN}| {call[2]} {frameN}| {call[3]} {frameN}| {call[3]} ---> at File={dirName/fileName} Line={line}:

For example for only a single line error: 1: stop("This is a crash") ---> at File=R/my_r_code_file.R Line=234

Currently all call lines are printed for a given stack. The last line with source file info only printed if hasSrcInfo=TRUE. Else it is ommited.

Value

characer(1) the formatted character string containing info of a single frame in the stackstrace


[Package tinytest2JUnit version 1.1.2 Index]