Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Determines if the caller of the script engine can handle a specified exception.
Syntax
HRESULT CanHandleException(
EXCEPINFO* pExcepInfo,
VARIANT* pvar
);
Parameters
pExcepInfo
[in] Pointer to an EXCEPINFO structure containing the information that will be reported if no exception handler is found.
pvar
[in] A value associated with the exception, such as the value thrown by a throw statement. This parameter may be NULL.
Return Value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Value | Description |
|---|---|
S_OK |
The caller can handle the exception |
E_FAIL |
The caller cannot handle the exception. |
Remarks
If a call to IDispatchEx::InvokeEx, or a similar method, results in an exception, the script engine checks for a caller in the script's caller chain that supports the ICanHandleException interface and indicates that it can handle the exception. If no caller can handle the exception, the script engine halts.