You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I log an error with eg. tryCatchLog() the stack trace lines are cut at a column width of 80 or similar
which makes it difficult sometimes to identify the error reason easily by looking just at the R code contained in the stack trace:
R' internal implementation of creating a stack trace uses the function limitedLabels which cuts lines at a maxwidth of getOption("width") - 5L and "width" is 80 or 120/130 by default (R console vs. RStudio) and may not exceed the value 1000.
tryCatchLog uses a modified implementation of this function but still uses the "width" restriction.
You can change the width on a global level eg. via this code snippet
options(width = 200)
but this then applies to every R function that uses this option and may be an unwanted side effect.
Feature request:
It would be better
to provide and use a separate option like "tryCatchLog.max.stacktrace.width"
with a sensible default, eg. a width of 200.
Credits:
Many thanks to MS-SQL guru HSc for making this proposal!
The text was updated successfully, but these errors were encountered:
aryoda
changed the title
Stacktrace output is cut at width 80, 120 or similar per line and important information is missing therefore
Stacktrace line output is cut at column width 80, 120 or similar and important information is missing therefore
Dec 4, 2020
Problem description:
If I log an error with eg.
tryCatchLog()
the stack trace lines are cut at a column width of 80 or similarwhich makes it difficult sometimes to identify the error reason easily by looking just at the R code contained in the stack trace:
Reason:
R' internal implementation of creating a stack trace uses the function
limitedLabels
which cuts lines at a maxwidth ofgetOption("width") - 5L
and "width" is 80 or 120/130 by default (R console vs. RStudio) and may not exceed the value 1000.tryCatchLog
uses a modified implementation of this function but still uses the "width" restriction.You can change the width on a global level eg. via this code snippet
but this then applies to every R function that uses this option and may be an unwanted side effect.
Feature request:
It would be better
Credits:
Many thanks to MS-SQL guru HSc for making this proposal!
The text was updated successfully, but these errors were encountered: