Share via


COM.error Method

Returns a COMError object that is associated with the instance of the COM class.

Syntax

public COMError error()

Run On

Called

Return Value

Type: COMError Class
A COMError value that represents the error that is associated with the instance of the COM class.

Examples

The following example shows how to retrieve the error object that is associated with an instance of the COM class.

COMError err; 
 
// The obj variable was previously instantiated. 
err = obj.error(); 
 
// Output the error number. 
info(strfmt("Error: %1", err.number()))

See Also

COM Class

COMError Class