COMStop | R Documentation |
This is a general function for raising an exception in a DCOM computation from within R. It takes a message and a status code (an integer from the DCOM operation) and raises an error. The class of the error can be specified allowing for different types of errors to be distinguished. It is the ability to specify the class of the error that makes this general.
COMStop(msg, status, class)
msg |
a message string to display in the error, intended to be human readable. |
status |
an integer that identifies the type of the DCOM error. These are interpreted relative to a table of errors. We should make this available from the R language by accessing the C structures. |
class |
a character vector giving the name of the class(es) for
the error being created.
One can specify different class names to allow error handlers
to easily differentiate between types of errors using
|
This uses the exception mechanism in R to provide extensible error objects that can be caught in a flexible manner.
An error object of the class specified by class
.
Duncan Temple Lang <duncan@r-project.org>
http://www.omegahat.net/RDCOMServer http://www.omegahat.net/RDCOMClient
.COM
## Not run: COMStop("A fake error message", 1, "FakeCOMError") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.