In my application, the user supplies a function name, and I attempt to call it over two different COM interfaces. The logic is pretty simple:
- Attempt the first interface
- If that doesn't work attempt the second interface
- If that doesn't work, display an error message
Right now, I've tried to suppress potential error messages from the first interface using:
- try()
- try(, silent = TRUE)
- tryCatch()
- withCallingHandlers()
- sink()
- capture.output()
- suppressMessages()
- suppressWarnings()
When an error occurs, two things are printed to the console:
checkErrorInfo ########
(some number that means something)- An error message
All the approaches I listed above can capture/suppress the error message, but nothing touches the checkErrorInfo
message. I've also searched the RDCOMClient repo on GitHub, but I don't see this phrase anywhere. I'm assuming, then, that this is being generated by COM directly.
Anyway, I think I've tried all the easy answers. If it simply isn't possible to suppress this, I'll decide whether to live with the message or make the user specify which interface to use (not ideal - I'd like to keep it as simple as possible).
Thanks in advance for the help!