Error handling in ActiveX components

Handle errors that may occur during a method call as follows:

In general, if an error prevents completion of a desired task (such as database updates that represent a new sales order), you should generate an ActiveX automation exception to send a concise description of the problem to the client. Messages sent to the client should be concise and contain language suitable for display to the end user. You can record more detailed messages in the log file.

IDL user-defined exceptions are not supported.

Never write your component to send error messages to the console to display dialog boxes. Servers run unattended; showing a dialog box does nothing but hang the thread that executes your component.