search for: printwarnings

Displaying 11 results from an estimated 11 matches for "printwarnings".

2010 Oct 01
2
Will PrintWarnings remain non static?
Hi, The C function PrintWarnings is currently not in the C API, but it is declared non static in the svn trunk as of revision 53110 . As this is the only function that creates the last.warning object used by the R function warnings(), I think it would be useful for programs that embed R to be able to call it. So, will it remain n...
2023 Apr 26
1
Warnings created during R_eval or R_tryEval not shown before R ending or R error.
? Sun, 23 Apr 2023 13:33:16 -0400 Laurent Gautier <lgautier at gmail.com> ?????: > When tracing what happens during an error I found that > verrorcall_dflt() in src/main/errors.c calls PrintWarnings(). That > function is not part of R's C-API though. I've tried reading the source code and came to a similar conclusion. PrintWarnings() is required for warnings() to work because it creates the last.warning variable for warnings() to access. When driving an embedded R, R_ReplDLLdo1()...
2023 Apr 23
1
Warnings created during R_eval or R_tryEval not shown before R ending or R error.
...ded R is interactive (R_Interactive is 1). Moreover, when the evaluation of another R expression after the warnings results in an R error I get the error message shown followed by pending warnings. When tracing what happens during an error I found that verrorcall_dflt() in src/main/errors.c calls PrintWarnings(). That function is not part of R's C-API though. Would anyone have a suggestion about what I am missing? Best, Laurent [[alternative HTML version deleted]]
2005 Oct 17
1
RFC: API to allow identification of warnings and errors in the output stream
...Of course, the naming may not be perfect? 2) While 1 makes it easy to split warning _and_ errors (and messages) from regular output, it does not suffice to differentiate _between_ warnings, errors, and messages on the error channel. The patch addresses this, by making inError, inWarning, and inPrintWarnings from errors.c accessible (read-only) in R_ext/Error.h. This part of the patch may be slightly more delicate, in that inError, inWarning, and inPrintWarnings seem to be more internal status indications. So the question is: Are those potentially subject to change, if errors.c is redesigned some d...
2006 Aug 31
1
Overriding InitTempDir
For embedded projects, one may want to eliminate the per-session temp directory created by InitTempDir() and just use a system-specific temp directory. Here's my solution: extern char *R_TempDir; void my_InitTempDir() { char *tmp; if (R_TempDir){ if (rmdir(R_TempDir) != 0){ perror("Fatal Error: could not remove R's TempDir!");
2019 Jul 13
2
Mitigating Stalls Caused by Call Deparse on Error
...inError = 2; -?? ???? PROTECT(s = R_GetTraceback(0)); +?? ???? PROTECT(s = R_GetTracebackParsed(0)); ??? ???? SET_SYMVALUE(install(".Traceback"), s); ??? ???? /* should have been defineVar ??? ??????? setVar(install(".Traceback"), s, R_GlobalEnv); */ @@ -1440,9 +1440,11 @@ ??? ?PrintWarnings(); ???? } ?} - +/* + * Return the traceback without deparsing the calls + */ ?attribute_hidden -SEXP R_GetTraceback(int skip) +SEXP R_GetTracebackParsed(int skip) ?{ ???? int nback = 0, ns; ???? RCNTXT *c; @@ -1467,7 +1469,9 @@ ??? ???? if (skip > 0) ??? ??? ?skip--; ??? ???? else { -?? ??? ?SET...
2007 Jan 18
0
Emulating a REPL in frontends
...PROTECT(R_CurrentExpr); R_Busy(1); value = eval(R_CurrentExpr, rho); if(set_last_sym_value) SET_SYMVALUE(R_LastvalueSymbol, value); if ((print_mode==1) || (R_Visible && (print_mode==0))) wasDisplayed = TRUE; PrintValueEnv(R_CurrentExpr, rho); if (R_CollectWarnings) PrintWarnings(); if(do_toplevel_callbacks) { Rf_callToplevelHandlers(R_CurrentExpr, value, TRUE, wasDisplayed); } R_CurrentExpr = value; UNPROTECT(1); R_IoBufferWriteReset(&R_ConsoleIob); R_Busy(0); return value; case PARSE_ERROR: parseError(R_NilValue, 0); R_IoBufferWriteReset(&R_Conso...
2019 Jul 14
2
[External] Mitigating Stalls Caused by Call Deparse on Error
...(s = R_GetTraceback(0)); > +?? ???? PROTECT(s = R_GetTracebackParsed(0)); > ??? ???? SET_SYMVALUE(install(".Traceback"), s); > ??? ???? /* should have been defineVar > ??? ??????? setVar(install(".Traceback"), s, R_GlobalEnv); */ > @@ -1440,9 +1440,11 @@ > ??? ?PrintWarnings(); > ???? } > ?} > - > +/* > + * Return the traceback without deparsing the calls > + */ > ?attribute_hidden > -SEXP R_GetTraceback(int skip) > +SEXP R_GetTracebackParsed(int skip) > ?{ > ???? int nback = 0, ns; > ???? RCNTXT *c; > @@ -1467,7 +1469,9 @@ > ?...
2019 Jul 16
1
[External] Mitigating Stalls Caused by Call Deparse on Error
...ROTECT(s = R_GetTracebackParsed(0)); >>> SET_SYMVALUE(install(".Traceback"), s); >>> /* should have been defineVar >>> setVar(install(".Traceback"), s, R_GlobalEnv); */ >>> @@ -1440,9 +1440,11 @@ >>> PrintWarnings(); >>> } >>> } >>> - >>> +/* >>> + * Return the traceback without deparsing the calls >>> + */ >>> attribute_hidden >>> -SEXP R_GetTraceback(int skip) >>> +SEXP R_GetTracebackParsed(int skip) >>> { &gt...
2019 Jul 14
0
[External] Mitigating Stalls Caused by Call Deparse on Error
...(s = R_GetTraceback(0)); > +?? ???? PROTECT(s = R_GetTracebackParsed(0)); > ??? ???? SET_SYMVALUE(install(".Traceback"), s); > ??? ???? /* should have been defineVar > ??? ??????? setVar(install(".Traceback"), s, R_GlobalEnv); */ > @@ -1440,9 +1440,11 @@ > ??? ?PrintWarnings(); > ???? } > ?} > - > +/* > + * Return the traceback without deparsing the calls > + */ > ?attribute_hidden > -SEXP R_GetTraceback(int skip) > +SEXP R_GetTracebackParsed(int skip) > ?{ > ???? int nback = 0, ns; > ???? RCNTXT *c; > @@ -1467,7 +1469,9 @@ > ?...
2019 Jul 15
0
[External] Mitigating Stalls Caused by Call Deparse on Error
...>> +?? ???? PROTECT(s = R_GetTracebackParsed(0)); >> ??? ???? SET_SYMVALUE(install(".Traceback"), s); >> ??? ???? /* should have been defineVar >> ??? ??????? setVar(install(".Traceback"), s, R_GlobalEnv); */ >> @@ -1440,9 +1440,11 @@ >> ??? ?PrintWarnings(); >> ???? } >> ?} >> - >> +/* >> + * Return the traceback without deparsing the calls >> + */ >> ?attribute_hidden >> -SEXP R_GetTraceback(int skip) >> +SEXP R_GetTracebackParsed(int skip) >> ?{ >> ???? int nback = 0, ns; >> ?...