12 inline Exception::Exception (error_code errCode,
const path& p1,
const path& p2)
13 : inherited{mkMsg_ (errCode, p1, p2), mkMsg_ (errCode, p1, p2).AsNarrowSDKString (Characters::eIgnoreErrors), p1, p2, errCode}
15 Require (not p1.empty () or p2.empty ());
17 inline Exception::Exception (error_code errCode,
const Characters::String& message,
const path& p1,
const path& p2)
18 : inherited{mkMsg_ (errCode, message, p1, p2), mkMsg_ (errCode, message, p1, p2).AsNarrowSDKString (Characters::eIgnoreErrors), p1, p2, errCode}
20 Require (not p1.empty () or p2.empty ());
22#if qStroika_Foundation_Common_Platform_Windows
23 template <
typename WINDOWS_API_RESULT>
24 inline static void Exception::ThrowIfZeroGetLastError (WINDOWS_API_RESULT test,
const path& p1,
const path& p2)
27 ThrowSystemErrNo (::GetLastError (), p1, p2);
31 template <
typename INT_TYPE>
32 inline INT_TYPE Exception::ThrowPOSIXErrNoIfNegative (INT_TYPE returnCode,
const path& p1,
const path& p2)
34 if (returnCode < 0) [[unlikely]] {
35 ThrowPOSIXErrNo (errno, p1, p2);