Two applications will be running when the system invokes a COM component: the client application
and the server. When an error happens in your server, you want to make sure the error is handled
adequately.
Because your server should run as transparently as possible to the client, your first line of
defense for error handling in the server should be full-blown error handling within the server
itself.
At times, however, it is more appropriate to let the client handle an error that has occurred.
When you need to pass an error back to the client, you can use one of two methods for letting your
client application know that an error has occurred:
The following sections discuss these two methods.
-
Passing a Result Code to the Client
-
Raising an Error to Pass Back to the Client