IWTTLog::AddErrorToErrorList method
The AddErrorToErrorList method adds the specified error type and error code to the given list of known errors.
Syntax
HRESULT AddErrorToErrorList(
DWORD dwErrorToAdd,
WTTLOGGER_ERROR_TYPE dwErrorType,
WTTLOGGER_ERROR_LIST dwErrorList
);
Parameters
dwErrorToAdd
[in] The error code to add.dwErrorType
[in] The type of the error. This parameter can be one of the following values: WTTLOG_ERROR_TYPE_HRESULTWTTLOG_ERROR_TYPE_NTSTATUSWTTLOG_ERROR_TYPE_WIN32WTTLOG_ERROR_TYPE_BOOLdwErrorList
WTTLOGGER_ERROR_LIST[in] The list to which the error will be added. This parameter can be one of the following values: WTTLOG_ERROR_LIST_EXPECTEDWTTLOG_ERROR_LIST_BREAKON
Return value
AddErrorToErrorList returns one of the following values:
Return code | Description |
---|---|
S_OK | The operation was successful. |
S_FALSE | The operation was successful but the last device has been detached, which has triggered a rollup. |
HRESULT | The operation failed. You should use the FAILED macro to check HRESULT values. |
Remarks
DTM Logger uses the error lists to enable a test to pass even though the return value from a test function is an error. The CheckResult method compares the error type and error code that is passed to it with the know errors on the list. If the error is on the list, CheckResult returns S_OK, indicating the test passed. If the error is not on the list, the test fails.
Requirements
IDL |
Log.IDL |
Library |
WTTLogCM.dll |
See also
IWTTLog::RemoveErrorFromErrorList
Build date: 9/14/2012