System.Win.ComObj.IServerExceptionHandler.OnException
Delphi
procedure OnException( const ServerClass, ExceptionClass, ErrorMessage: WideString; ExceptAddr: NativeInt; const ErrorIID, ProgID: WideString; var Handled: Integer; var Result: HResult); dispid 2;
C++
virtual void __fastcall OnException(const System::WideString ServerClass, const System::WideString ExceptionClass, const System::WideString ErrorMessage, NativeInt ExceptAddr, const System::WideString ErrorIID, const System::WideString ProgID, int &Handled, HRESULT &Result) = 0 ;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Win.ComObj.pas System.Win.ComObj.hpp |
System.Win.ComObj | IServerExceptionHandler |
Description
Handles SafeCall exceptions that occur in a TComObject.
TComObject.SafeCallException calls this procedure on the ServerExceptionHandler property of its TComObject instance when an exception occurs. If OnException handles this exception, SafeCallException exits with the result value that you specify; otherwise, SafeCallException calls HandleSafeCallException.
This procedure receives the following parameters:
Parameter | Description |
---|---|
ServerClass
|
Name of the TComObject class. |
ExceptionClass
|
Name of the class of the exception passed to the TComObject.SafeCallException function. |
ErrorMessage
|
Error message of the exception passed to the TComObject.SafeCallException function. |
ExceptAddr
|
Address of the exception object, as passed to the TComObject.SafeCallException function. |
ErrorIID
|
String representation of the global unique identifier (GUID) of the error that occurred. |
ProgID
|
Global unique identifier (GUID) of the TComObject instance. |
Handled
|
Change this parameter to a non-zero value within your OnException implementation to indicate that you have handled the exception. Otherwise, TComObject.SafeCallException calls HandleSafeCallException to handle this exception. |
Result
|
Use this parameter to define the return value of the TComObject.SafeCallException function.
|