AuroraRuntime/Source/Debug/Debug.hpp
2021-06-27 22:25:29 +01:00

37 lines
787 B
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Debug.hpp
Date: 2021-6-12
Author: Reece
***/
#pragma once
namespace Aurora::Debug
{
struct LastError
{
AuUInt address;
FailureCategory category;
AuString dbg;
};
using OSError_t = std::pair<AuUInt64, AuString>;
AuUInt32 GetOSErrorFence();
std::optional<OSError_t> TryGetOrFetchOSError();
std::optional<OSError_t> TryFetchOSError();
AuUInt32 GetCErrorFence();
std::optional<int> TryFetchCError();
std::optional<int> TryGetOrFetchCError();
AuUInt32 GetStackTraceFence();
std::optional<int> TryFetchStackTrace();
std::optional<int> TryGetOrFetchStackTrace();
void CheckErrors();
void InitDebug();
}