Yep, Use the safecall declaration as used in COM objects. 

You can then implement a safecallexception handler object, which is called
if an exception is propagated outside a call to you method calls.

Notes: I'm not certain if you have to inherited from TInterfaced object (or
whatever the root COM object is?) to get this.

The safecall declaration wraps a try .. except block around every method
with this declaration.

You can implement a single SafecallException handler, or have one for each
object.

Myles.


> -----Original Message-----
> From: Patrick Dunford [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, 17 December 1999 18:33
> To:   Multiple recipients of list delphi
> Subject:      [DUG]:  generic exception handlers
> 
> I want to write a procedure that can be passed the name of another
> procedure
> and its parameters. It implements an exception handler for that call (so I
> don't have to write try..except around every single call in my program).
> Or
> is there another way of doing it?
> 
> 
> --------------------------------------------------------------------------
> -
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to