Skip to content
Prev 58735 / 63424 Next

Unexpected Error Handling by Generic in R 4.0.1

Hello R-devel community,

I posted a new R 4.0.1 behaviour to stack overflow (https://stackoverflow.com/questions/62327810/inconsistent-error-handling-of-function-and-s4-generics-on-r-4-0-1), where I think it is an undesired or unexpected change in 4.0.1. Attributes of errors seem to be lost or obscured when encountered in an S4 generic context.

An example of this being undesirable comes in shiny applications where my_reactive (an unevaluated reactive object) returns a shiny.silent.error attribute which is lost upon error within an S4 generic function. The lack of this attribute causes the entire application to exit with an error (with no stack trace available). For example, within a shiny context:
<shiny.silent.error: >

Where the S4 generic returns:
<simpleError in (function (cond) .Internal(C_tryCatchHelper(addr, 1L, cond)))(structure(list(message = ""), class = c("shiny.silent.error", "validation", "error", "condition"), stack.trace = [... lots more output here ...]: error in evaluating the argument 'x' in selecting a method for function 'nrow': >
Thank you,

Matthew Carlucci

CONFIDENTIALITY NOTICE: This e-mail message, including a...{{dropped:18}}