AuroraRuntime/Include/Aurora/Debug/Debug.hpp
Reece fbd437d3d4 [+] Added LocaleStrings.hpp -> NewLine
[*] LocaleStrings should always return constant references
[*] Readded line splitting logic to the new Logger class
2022-01-26 08:30:19 +00:00

68 lines
1.9 KiB
C++

/***
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 <Aurora/Console/Console.hpp>
#include "StackTrace.hpp"
#include "EFailureCategory.hpp"
namespace Aurora::Debug
{
using OSError_t = AuPair<AuUInt64, AuString>;
/**
Retrieves a print-friendly callstack of the last trap (either innocent exception or fatal mem access) <br>
On Win32, this information is always available <br>
On other platforms, this function will likely yield no valuable information
*/
AUKN_SYM AuString GetLastErrorStack();
AUKN_SYM StackTrace GetLastStackTrace();
AUKN_SYM StackTrace GetStackTrace();
/**
Retrieve information about the last exception. <br>
On Win32, this information is always available <br>
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 OSError_t GetLastSystemMessage();
/**
Prints the current error state of the thread including: <br>
Current System Error, <br>
Current Runtime Error, <br>
Last Exception Call Stack, <br>
Last major ring notification
*/
AUKN_SYM void PrintError();
AUKN_SYM void CheckErrors();
/**
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"