Board index » cppbuilder » How to capture server exceptions on client

How to capture server exceptions on client


When the client machine starts up a server, the server performs some
initialization code and activates the TDatabase object (Connected =
The server code is all started when the client sets the
active property to true.

If an exception occurs, how can this exception message be displayed on
the client machine?  We are using DCOM.  TCOMI variables and method
calls provide HRESULTS in which to return exceptions.  If you first
to the server using TMIDASConnection, can you get the error to
back to the client machine?

Mark (


Re:How to capture server exceptions on client

Exceptions will automatically propagate from server to client if they
are raised inside a method that has the safecall directive. If you're
using the initialization section for code that may generate an
exception, move it to another place (e.g. FormCreate).
Dan Miser

Other Threads