Skip to content

Documentation tweak for ?traceback

2 messages · brodie gaslam, Martin Maechler

#
The addition of `.traceback` in r70207 adds one more function to the call stack when invoking `traceback()`.? This changes the output of one of the examples to include the error handler call:
[1] 1
Error in bar(2) : object 'a.variable.which.does.not.exist' not found
3: (function () 
?? traceback(2))() at #1
2: bar(2) at #1
1: foo(2)

The attached trivial patch cleans up the example so that the above looks like it would have under r<70207.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: traceback-docs-1.txt
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20190711/90e0da30/attachment.txt>
1 day later
#
> call stack when invoking `traceback()`.  This changes the output of one
   > of the examples to include the error handler call:
   > > options(error = function() traceback(2))
   > > foo(2)
   > [1] 1
   > Error in bar(2) : object 'a.variable.which.does.not.exist' not found
   > 3: (function ()
   >    traceback(2))() at #1
   > 2: bar(2) at #1
   > 1: foo(2)
   > The attached trivial patch cleans up the example so that the above
   > looks like it would have under r<70207.

Indeed, thanks a lot, Brodie!
There was a bit more to change -- the options() setting
is also mentioned in the main text.

Committed to R-devel and R-patched now.

Martin Maechler
ETH Zurich and  R Core Team