Accessing Error Information at the COM Level

Meta Data Services Programming

Meta Data Services Programming

Accessing Error Information at the COM Level

COM programs can access all of the errors in a repository error queue. You can use IRepositoryErrorQueue to select, insert, or remove errors in a repository error queue. You can also persist queue information if you want to return to it after working with other error queues or repository objects.

To access the errors in a COM program

  • Use the QueryInterface method on any repository object interface to obtain an IReposErrorQueueHandler interface pointer. There is an IRepository interface pointer associated with each instance of the Repository class.

    -or-

  • Call the GetErrorQueue method of the IReposErrorQueueHandler interface to obtain an IRepositoryErrorQueue interface pointer.

    -or-

  • Use the Count method of the IRepositoryErrorQueue interface to get the number of elements in the error queue, and the Item method to retrieve the error information for each error in the queue.

The repository engine also provides an enumeration interface for errors called IEnumRepositoryErrors.

See Also

Error Handling Overview

IEnumRepositoryErrors Interface

IRepositoryErrorQueue Interface

IReposErrorQueueHandler Interface

Persisting Error Queue Information

Repository Class