COMError {RDCOMServer}R Documentation

Constructor for COM error

Description

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.

Usage

COMError(code, description = "", className = "COMError")
getCOMErrorCode(name)

Arguments

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 .COMErrors
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.

Value

An S3-style object containing elements for

code the numeric value of the code
description the string describing the error

Author(s)

Duncan Temple Lang <duncan@research.bell-labs.com>

References

http://www.omegahat.org/RDCOMServer http://www.omegahat.org/SWinRegistry

See Also

SCOMIDispatch

Examples

 COMError("DISP_E_MEMBERNOTFOUND", "No such element 'foo'")

 name <- "foo"
 COMError("DISP_E_MEMBERNOTFOUND", paste("No such element '", name, "'", sep=""))

[Package Contents]