Description Usage Arguments Details Value See Also
View source: R/get_pretty_call_stack.R
Enriches the current call stack with the source file names and row numbers to track the location of thrown conditions and generates a prettily formatted list of strings
1 | get.pretty.call.stack(call.stack, omit.last.items = 0, compact = FALSE)
|
call.stack |
Call stack object created by |
omit.last.items |
Number of call stack items to drop from the end of the full stack trace |
compact |
TRUE will return only call stack items that have a source code reference (FALSE all) |
How to read the call stack:
Call stack items consist of:
<call stack item number> [<file name>#<row number>:] <expression executed by this code line>
The last call stack items with a file name and row number points to the source code line causing the error.
Ignore all call stack items that do not start with a file name and row number (R internal calls only)
You should only call this function from within withCallingHandlers
, NOT from within tryCatch
since tryCatch unwinds the call stack to the tryCatch position and the source of the condition cannot be identified anymore.
The call stack (sys.calls
) without the last number of function calls (given by "omit.last.items")
to remove irrelevant calls caused e. g. by exception handler (withCallingHandlers
)
or restarts (of warnings).
tryCatchLog
, tryLog
, limitedLabelsCompact
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.