| 21 | code_{ (HRESULT)GetLastError() } {} |
| 22 | |
| 23 | std::string HrError::ComposeWhatString_() const noexcept |
| 24 | { |
| 25 | try { |
| 26 | std::ostringstream oss; |
| 27 | oss << GetNote() << " HRESULT:[" << std::hex << code_ << std::dec << "] => " |
| 28 | << win::GetErrorDescription(code_); |
| 29 | if (HasTrace()) { |
| 30 | oss << "\n" << GetTraceString(); |
| 31 | } |
| 32 | return oss.str(); |
| 33 | } |
| 34 | catch (...) {} |
| 35 | return {}; |
| 36 | } |
| 37 | |
| 38 | HRESULT HrError::GetCode() const noexcept { return code_; } |
| 39 |
nothing calls this directly
no test coverage detected