RoCaptureErrorContext function

Saves the current error context so that it's available for later calls to the RoFailFastWithErrorContext function.

Syntax


HRESULT WINAPI RoCaptureErrorContext(
  HRESULT hrError
);

Parameters

hrError

The HRESULT associated with the error.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The RoCaptureErrorContext function captures the context associated with an error, including the stack-backtrace. This information is stored in the restricted error object and is available to the Windows Error Reporting (WER) service, if WER is enabled, and if a subsequent call is made to the RoFailFastWithErrorContext function.

To use RoCaptureErrorContext function with RoOriginateError, call RoOriginateError first, and then call RoCaptureErrorContext. Calling in the reverse order may cause the error context to be lost.

Windows Phone 8: This API is supported.

Windows Phone 8.1: This API is supported.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

Roerrorapi.h

See also

IRestrictedErrorInfo
RoOriginateError
RoOriginateErrorW
RoFailFastWithErrorContext

 

 

Community Additions

ADD
Show:
© 2014 Microsoft