Skip to content

How to catch warnings sent by arguments of s4 methods ?

1 message · Karl Forner

#
Hi,
Just to add some information and to clarify why I feel this is an
important issue.

If you have a S4 method with a default argument, it seems that you can
not catch the warnings
emitted during their evaluation. It matters because on some occasions
those warnings carry an essential information,
that your code needs to use.

Martin Morgan added some information about this issue on:
http://stackoverflow.com/questions/20268021/how-to-catch-warnings-sent-during-s4-method-selection
Basically the C function R_dispatchGeneric  uses R_tryEvalSilent to
evaluate the method arguments, that seems no to use the calling
handlers.

Best,
Karl
On Fri, Nov 29, 2013 at 11:30 AM, Karl Forner <karl.forner at gmail.com> wrote: