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

How to capture server exceptions on client

Hi-

When the client machine starts up a server, the server performs some
initialization code and activates the TDatabase object (Connected =
true).
The server code is all started when the client sets the
TMIDASConnection
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
connect
to the server using TMIDASConnection, can you get the error to
propagate
back to the client machine?

Thanks,
Mark (mbr...@dsi-inc.net)

 

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
http://www.execpc.com/~dmiser

Other Threads