4#ifndef _Stroia_Foundation_Execution_Exceptions_h_
5#define _Stroia_Foundation_Execution_Exceptions_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
13#include <system_error>
50#if qCompilerAndStdLib_Supports_errno_t
100 template <
typename T>
101 nonvirtual T
As ()
const;
116 string fSDKCharString_;
156 template <
typename BASE_EXCEPTION = exception>
159 static_assert (derived_from<BASE_EXCEPTION, exception>);
162 using inherited = BASE_EXCEPTION;
176 template <
typename... BASE_EXCEPTION_ARGS>
184 virtual const char*
what ()
const noexcept override;
197 template <
typename BASE_EXCEPTION = runtime_error>
218 const exception_ptr fBasedOnException;
276 template <
typename BASE_EXCEPTION = system_error>
279 static_assert (derived_from<BASE_EXCEPTION, system_error>);
299 template <
typename... BASE_EXCEPTION_ARGS>
333 template <
typename INT_TYPE>
366 [[noreturn]]
void ThrowSystemErrNo (
int sysErr);
367#if qStroika_Foundation_Common_Platform_POSIX or qStroika_Foundation_Common_Platform_Windows
368 [[noreturn]]
void ThrowSystemErrNo ();
389 template <
typename CALL>
432 template <
typename F>
442#include "Exceptions.inl"
String is like std::u32string, except it is much easier to use, often much more space efficient,...
Exception<> is a replacement (subclass) for any std c++ exception class (e.g. the default 'std::excep...
virtual const char * what() const noexcept override
nonvirtual Containers::Stack< Activity<> > GetActivities() const
nonvirtual Characters::String GetBasicErrorMessage() const
nonvirtual const char * _PeekAtNarrowSDKString_() const
nonvirtual Characters::String GetFullErrorMessage() const
ExceptionStringHelper()=delete
NestedException contains a new higher level error message (typically based on argument basedOnExcepti...
void ThrowPOSIXErrNo(errno_t errNo=errno)
treats errNo as a POSIX errno value, and throws a SystemError (subclass of @std::system_error) except...
auto Handle_ErrNoResultInterruption(CALL call) -> decltype(call())
Handle UNIX EINTR system call behavior - fairly transparently - just effectively removes them from th...
void ThrowPOSIXErrNoIfNull(void *returnValue)
auto TranslateExceptionToOptional(F &&f) -> optional< remove_cvref_t< invoke_result_t< F > > >
optional< error_code > GetAssociatedErrorCode(const exception_ptr &e) noexcept
INT_TYPE ThrowPOSIXErrNoIfNegative(INT_TYPE returnCode)