4#ifndef _Stroia_Foundation_Execution_Throw_h_
5#define _Stroia_Foundation_Execution_Throw_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
12#include <system_error>
14#include "Stroika/Foundation/Common/Common.h"
15#include "Stroika/Foundation/Common/Concepts.h"
49#ifndef qStroika_Foundation_Execution_Throw_TraceThrowpoint
50#define qStroika_Foundation_Execution_Throw_TraceThrowpoint qStroika_Foundation_Debug_DefaultTracingOn
60#ifndef qStroika_Foundation_Execution_Throw_TraceThrowpointBacktrace
61#define qStroika_Foundation_Execution_Throw_TraceThrowpointBacktrace qStroika_Foundation_Debug_DefaultTracingOn
77 [[noreturn]]
void Throw (T&& e2Throw);
79 [[noreturn]]
void Throw (T&& e2Throw,
const char* traceMsg);
81 [[noreturn]]
void Throw (T&& e2Throw,
const wchar_t* traceMsg);
87 [[noreturn]]
void ReThrow (
const exception_ptr& e);
88 [[noreturn]]
void ReThrow (
const char* traceMsg);
89 [[noreturn]]
void ReThrow (
const exception_ptr& e,
const char* traceMsg);
90 [[noreturn]]
void ReThrow (
const wchar_t* traceMsg);
91 [[noreturn]]
void ReThrow (
const exception_ptr& e,
const wchar_t* traceMsg);
96 template <equality_comparable_with<
nullptr_t> T,
typename E>
98 template <equality_comparable_with<
nullptr_t> T>
100 template <Common::Weak_Equality_Comparable_With<nullopt_t> T,
typename E>
102 requires (not equality_comparable_with<nullptr_t, T>);
103 template <Common::Weak_Equality_Comparable_With<nullopt_t> T>
105 requires (not equality_comparable_with<nullptr_t, T>);
112#define IgnoreExceptionsForCall(theCode) \
124#define IgnoreExceptionsExceptThreadAbortForCall(theCode) \
128 catch (const Stroika::Foundation::Execution::Thread::AbortException&) { \
129 Execution::ReThrow (); \
void Throw(T &&e2Throw)
identical to builtin C++ 'throw' except that it does helpful, type dependent DbgTrace() messages firs...
void ThrowIfNull(const Private_::ConstVoidStar &p, const HRESULT &hr)
Template specialization for ThrowIfNull (), for thing being thrown HRESULT - really throw HRESULTErro...