/// <summary>Error message from HRESULT code</summary> public static string customErrorMessage(int hr) { int mask = hr & facilityMask; int code = hr & 0xFFFF; string message; switch (mask) { case linuxErrorCode: message = LinuxErrors.tryLookup(code); if (null != message) { return($"Linux error code { code }, { message }"); } return($"Undocumented Linux error code { code }"); case xcbErrorCode: message = XcbErrors.tryLookup(code); if (null != message) { return($"XCB error code { code }, { message }"); } return($"Undocumented XCB error code { code }"); case windowsMediaErrorCode: message = WindowsMediaErrors.tryLookup(code); if (null != message) { return($"Windows media error code { code }: { message }"); } return($"Undocumented Windows media error code { code }"); } return(null); }
/// <summary>Human-readable message in English, from Linux errno result code</summary> public static string lookupLinuxError(int code) { return(LinuxErrors.tryLookup(code)); }