Commit 58a5e411 authored by Radford Neal's avatar Radford Neal

use CODEPROMISES for deparse in traceback

parent 36baa70c
......@@ -6,9 +6,15 @@ error display in the new scheme.
Make deparsing for errors use the new codePromises option. Changed
all the primitive replacement functions (eg, length<-, environment<-,
[<-, [[<-, $<-) to use errorcall, and otherwise ratiionalized error
handling in various places. Modified "try" to use the codePromises
option for deparsing.
[<-, [[<-, $<-) to use errorcall, and otherwise rationalized error
handling in various places. Modified "try" and "traceback" to use
the codePromises option for deparsing. Note that this improves
traceback output for errors like the following:
`f<-` <- function (x,value) x[1,1] <- value
a<-1
f(a)<-rep(3,100)
traceback()
Updated the saved output of reg-tests-2.Rout and reg-tests-1b.Rout
to show new error messages.
......@@ -1321,7 +1321,7 @@ SEXP R_GetTraceback(int skip)
if (skip > 0)
skip--;
else {
SETCAR(t, deparse1(c->call, 0, DEFAULTDEPARSE));
SETCAR(t, deparse1(c->call, 0, DEFAULTDEPARSE | CODEPROMISES));
if (c->srcref && !isNull(c->srcref))
setAttrib(CAR(t), R_SrcrefSymbol, duplicate(c->srcref));
t = CDR(t);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment