COMRETURNERROR( ) Function

See Also

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

Syntax

COMRETURNERROR(cExceptionSource, cExceptionText)

Arguments

cExceptionSource

Specifies the text for the source of the exception.

cExceptionText

Specifies the text for the description of the exception.

Remarks

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 on the COM exception structure and returns control to the client. Program execution on the Automation server is terminated from the point where COMRETURNERROR( ) is executed. The Automation server remains in memory and program execution on the Automation server resumes at the next method called by the client.

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