[Rd] silent option in nested calls to try()

Thomas Petzoldt Thomas.Petzoldt at tu-dresden.de
Mon Aug 27 14:40:57 CEST 2007


is it *really intentional* that the "silent" option of try() does only 
apply to the outer call in nested try constructs? I would assume that a 
silent try() should suppress all error messages regardless where they 
occur, even if they are already handled with other try()'s.

The error message itself should be (and is in both cases) reported by 
the return value of try().

Thanks in advance


## Old behavior (tested with R-2.4.1):
 >  try(try(exp(NULL)), silent=TRUE)

## Current behavior (R-2.6.0 unstable, build 42641, WinXP):
 >  try(try(exp(NULL)), silent=TRUE)
Error in exp(NULL) : Non-numeric argument to mathematical function

Thomas Petzoldt
Technische Universitaet Dresden
Institut fuer Hydrobiologie
01062 Dresden


More information about the R-devel mailing list