COMError | R Documentation |
This is an S-level constructor
that allows a programmer to return an error from
an S function to a C-level routine.
One can indicate different types of errors
using the different error codes
that are available in the S object named .COMErrors
.
COMError(code, description = "", className = "COMError") getCOMErrorCode(name)
code |
a name or value of the error code that corresponds to the internal
C-level API for Windows errors. These are dynamically computed
when the package is loaded and available as an S vector
as in the variable |
description |
text describing the problem. |
className |
the name of the S3 class used to represent the error. Currently, this is just an S3-style class name. |
name |
the name of the COM error whose numeric value is to be retrieved. |
An S3-style object containing elements for
code |
the numeric value of the code |
description |
the string describing the error |
Duncan Temple Lang <duncan@wald.ucdavis.edu>
http://www.omegahat.org/RDCOMServer http://www.omegahat.org/SWinRegistry
SCOMIDispatch
## Not run: COMError("DISP_E_MEMBERNOTFOUND", "No such element 'foo'") name <- "foo" COMError("DISP_E_MEMBERNOTFOUND", paste("No such element '", name, "'", sep="")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.