Contents

GetComponentInstanceError

Returns to your application the last error generated by a specific connection to a component.

Declaration

OSErr GetComponentInstanceError(ComponentInstance aComponentInstance);

Parameters

  • aComponentInstance:

    The component instance from which you want error information. Your application obtains the component instance from the 1516523 Opendefaultcomponent function or the 1516607 Opencomponent function. You can use a component identifier here, but you must coerce the data type appropriately.

Return Value

A result code. See Result Codes.

Discussion

Some component functions return error information as their function result. Other component functions set an error code that your application can retrieve using this function. Refer to the documentation supplied with the component for information on how that particular component handles errors.

Once you have retrieved an error code, the Component Manager clears the error code for the connection. If you want to retain that error value, you should save it in your application’s local storage.