Share via


CWTTLogger::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,
  DWORD dwErrorType,
  DWORD 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: WTT_ERROR_TYPE_HRESULTWTT_ERROR_TYPE_NTSTATUSWTT_ERROR_TYPE_WIN32WTT_ERROR_TYPE_BOOL

  • dwErrorList
    [in] The list to which the error will be added. This parameter can be one of the following values: WTT_ERROR_LIST_EXPECTEDWTT_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 function compares the error type and error code that are passed to it with the know errors on the list. If the error is on the list, CheckResult returns S_OK to indicate that the test passed. If the error is not on the list, the test fails.

Requirements

Header

Wttlogger.h

Library

Library:WTTLog.dll

See also

CWTTLogger Class (C++)

CWTTLogger::RemoveErrorFromErrorList

CWTTLogger::ClearErrorList

 

 

Build date: 9/14/2012