JavaScript Editor js editor     Web development 

Main Page

Populates the COM exception structure with information that Automation clients can use to determine the source of Automation errors.

COMRETURNERROR(cExceptionSource, cExceptionText)



Specifies the text for the source of the exception.

Specifies the text for the description of the exception.


COMRETURNERROR(В ) allows Visual FoxPro Automation servers to populate the COM exception structure so that Automation clients can determine the cause of an error on the Automation server.

Executing COMRETURNERROR(В ) places the specified text in the COM exception structure, aborts executing the current method, and returns control to the client. The Automation server remains in memory and the client can call more Automation server methods.

Visual FoxPro clients can use AERROR(В ) to view the text placed on the COM exception structure.

(For advanced users) COMReturnErrorInfo fills in a COM exception information structure. This is used only for IDispatch (late binding calls). If you call the server via early binding and the client passes a COM exception structure to the server, there is no error mechanism to return the error info unless the client does a QueryInterface on the ISupportsErrorInfo interface.

See Also

JavaScript Editor js editor     Web development