/*** Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: Debug.hpp Date: 2021-6-9 Author: Reece ***/ #pragma once #include #include "StackTrace.hpp" #include "FailureCategory.hpp" namespace Aurora::Debug { /** Retrieves a print-friendly callstack of the last trap (either innocent exception or fatal mem access)
On Win32, this information is always available
On other platforms, this function will likely yield no valuable information */ AUKN_SYM AuString GetLastErrorStack(); AUKN_SYM StackTrace GetLastStackTrace(); /** Retrieve information about the last exception.
On Win32, this information is always available
On other platforms, this information is only available within C++14 catch blocks */ AUKN_SYM AuString GetLastException(); /** Retrieve the last system error (IE: Win32, GetLastError()) */ AUKN_SYM AuString GetLastSystemMessage(); /** Prints the current error state of the thread including:
Current System Error,
Current Runtime Error,
Last Exception Call Stack,
Last major ring notification */ AUKN_SYM void PrintError(); /** Immediately terminates the process. May attempt some hardened telemetry debug ops */ AUKN_SYM AU_NORETURN void Panic(); AUKN_SYM void DebugBreak(); } #include "SysPanic.hpp" #include "SysAssertions.hpp" #include "SysErrors.hpp"