Skip to content
Prev 58736 / 63424 Next

[External] Unexpected Error Handling by Generic in R 4.0.1

Thanks for the report.

This is due to a change restoring behavior that was disabled
temporarily to work around a bug
(https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16111).
So it is again working as originally designed.

There are a number of places in the S4 dispatch code where errors are
caught and re-signaled with some additional information about the
dispatch context that might be helpful. Unfortunately all that is
retained from the original error is the message. It would be better to
signal a structured error object that includes the original error in a
slot.

Some options:

    Create and signal a structured error wrapping the original error in
    these cases.

    Revert the argument evaluation to not wrap errors.

    Drop wrapping of error from all other cases.

I don't have strong views on which way to go. But wrapping and
re-signaling from C would take a decent amount of effort so isn't likely
to happen without someone contributing a well-tested patch.

Best,

luke
On Thu, 25 Jun 2020, Matthew Carlucci wrote: