MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / MessageFromIRestrictedErrorInfo

Method MessageFromIRestrictedErrorInfo

ProgramLog/error/winrt.cpp:33–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33std::wstring Error::MessageFromIRestrictedErrorInfo(IRestrictedErrorInfo *info, HRESULT errCode)
34{
35 if (info)
36 {
37 wil::unique_bstr description, restrictedDescription, capabilitySid;
38 if (SUCCEEDED(info->GetErrorDetails(description.put(), &errCode, restrictedDescription.put(), capabilitySid.put())))
39 {
40 if (restrictedDescription)
41 {
42 return impl::FormatIRestrictedErrorInfo(errCode, restrictedDescription.get());
43 }
44 else if (description)
45 {
46 return impl::FormatIRestrictedErrorInfo(errCode, description.get());
47 }
48
49 // fall down to the return below, to call MessageFromHRESULT with the error code extracted from the error info.
50 }
51 }
52
53 return MessageFromHRESULT(errCode);
54}
55
56std::wstring Error::MessageFromHresultError(const winrt::hresult_error &error)
57{

Callers

nothing calls this directly

Calls 2

putMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected