Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
Fatal.h
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4#ifndef _Stroika_Foundation_Debug_Fatal_h_
5#define _Stroika_Foundation_Debug_Fatal_h_ 1
6
7#include "Stroika/Foundation/StroikaPreComp.h"
8
9#include "Stroika/Foundation/Characters/SDKChar.h"
10#include "Stroika/Foundation/Common/Common.h"
11
12/*
13 * TODO:
14 * @todo Consider adding in here the Windows Structured Error handling stuff here.
15 * I think we already have hooks to translate that into exceptions.
16 * Maybe thats better? Dunno.
17 */
18
19namespace Stroika::Foundation::Debug {
20
21 /**
22 * Default argument to RegisterDefaultFatalErrorHandlers
23 */
24 void DefaultFatalErrorHandler ([[maybe_unused]] const Characters::SDKChar* msg) noexcept;
25
26 /**
27 * set_unexpected () and set_terminate () to handlers which will abort the applicaiton and
28 * print to the tracelog.
29 *
30 * If called with no argument, it installs its OWN handler. To replace with your own, either call
31 * with an explicit handler here or call the underlying C++ APIs.
32 */
33 void RegisterDefaultFatalErrorHandlers (void (*fatalErrorHandler) (const Characters::SDKChar* msg) noexcept = &DefaultFatalErrorHandler);
34
35}
36
37#endif /*_Stroika_Foundation_Debug_Fatal_h_*/
conditional_t< qTargetPlatformSDKUseswchar_t, wchar_t, char > SDKChar
Definition SDKChar.h:71