Skip to content

winrt::throw_hresult should have an extension point to allow interop with WIL logging #841

Description

@dmachaj

There is currently a gap when combining cppwinrt usage with WIL and it's logging functionality. The gap is that cppwinrt exceptions that come out of winrt::throw_hresult are invisible to WIL. This is problematic in a few ways so it would be best to fill this gap so that these libraries interop better.

To achieve that an extension point should be added to winrt::throw_hresult. This extension point will be nullptr in normal usage. When <wil/cppwinrt.h> is included it will wire the extension point with a function pointer that can take the exception information and log it appropriately. (This will also require a change to WIL).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions