Stroika Library
3.0d25
Help-Home
Loading...
Searching...
No Matches
HRESULTErrorException.inl
1
/*
2
* Copyright(c) Sophist Solutions, Inc. 1990-2026. All rights reserved
3
*/
4
5
namespace
Stroika::Foundation::Execution::Platform::Windows
{
6
7
/*
8
********************************************************************************
9
****************** Platform::Windows::ThrowIfErrorHRESULT **********************
10
********************************************************************************
11
*/
12
inline
void
ThrowIfErrorHRESULT
(HRESULT hr)
13
{
14
if
(not SUCCEEDED (hr)) {
15
ThrowError
(error_code{hr,
HRESULT_error_category
()});
16
}
17
}
18
19
}
20
21
namespace
Stroika::Foundation::Execution
{
22
template
<>
23
inline
void
ThrowIfNull
(
const
Private_::ConstVoidStar& p,
const
HRESULT& hr)
24
{
25
ThrowIfNull
(p,
SystemErrorException
{hr,
Platform::Windows::HRESULT_error_category
()});
26
}
27
}
Stroika::Foundation::Execution::SystemErrorException
Definition
Exceptions.h:387
Stroika::Foundation::Execution::Platform::Windows
Definition
COM.h:19
Stroika::Foundation::Execution::Platform::Windows::ThrowIfErrorHRESULT
void ThrowIfErrorHRESULT(HRESULT hr)
Definition
HRESULTErrorException.inl:12
Stroika::Foundation::Execution::Platform::Windows::HRESULT_error_category
const error_category & HRESULT_error_category() noexcept
Definition
HRESULTErrorException.cpp:102
Stroika::Foundation::Execution
Definition
SDKString.inl:7
Stroika::Foundation::Execution::ThrowIfNull
void ThrowIfNull(const Private_::ConstVoidStar &p, const HRESULT &hr)
Template specialization for ThrowIfNull (), for thing being thrown HRESULT - really throw HRESULTErro...
Definition
HRESULTErrorException.inl:23
Stroika::Foundation::Execution::ThrowError
void ThrowError(error_code ec)
throw a SystemErrorException with the given error_code - or std::bad_alloc for errc::not_enough_memor...
Definition
Exceptions.inl:212
Library
Sources
Stroika
Foundation
Execution
Platform
Windows
HRESULTErrorException.inl
Generated by
1.9.8