4#ifndef _Stroika_Foundation_Execution_Throw_h_
5#define _Stroika_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
115 template <
typename T>
116 [[noreturn]]
void Throw (T&& e2Throw);
117 template <
typename T>
118 [[noreturn]]
void Throw (T&& e2Throw,
const char* traceMsg);
119 template <
typename T>
120 [[noreturn]]
void Throw (T&& e2Throw,
const wchar_t* traceMsg);
126 [[noreturn]]
void ReThrow (
const exception_ptr& e);
127 [[noreturn]]
void ReThrow (
const char* traceMsg);
128 [[noreturn]]
void ReThrow (
const exception_ptr& e,
const char* traceMsg);
129 [[noreturn]]
void ReThrow (
const wchar_t* traceMsg);
130 [[noreturn]]
void ReThrow (
const exception_ptr& e,
const wchar_t* traceMsg);
137 template <equality_comparable_with<
nullptr_t> T,
typename E>
139 template <equality_comparable_with<
nullptr_t> T>
141 template <Common::Weak_Equality_Comparable_With<nullopt_t> T,
typename E>
143 requires (not equality_comparable_with<nullptr_t, T>);
144 template <Common::Weak_Equality_Comparable_With<nullopt_t> T>
146 requires (not equality_comparable_with<nullptr_t, T>);
155 template <
typename EXPECTED>
156 typename EXPECTED::value_type
ThrowIfFailed (
const EXPECTED& e);
163#define IgnoreExceptionsForCall(theCode) \
175#define IgnoreExceptionsExceptThreadAbortForCall(theCode) \
179 catch (const Stroika::Foundation::Execution::Thread::AbortException&) { \
180 Execution::ReThrow (); \
void Throw(T &&e2Throw)
like the builtin C++ 'throw', but stamps in the current Activity context and does helpful,...
void ThrowIfNull(const Private_::ConstVoidStar &p, const HRESULT &hr)
Template specialization for ThrowIfNull (), for thing being thrown HRESULT - really throw HRESULTErro...
EXPECTED::value_type ThrowIfFailed(const EXPECTED &e)