AuroraRuntime/Source/Debug/Debug.hpp

38 lines
702 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;
EFailureCategory category;
AuString dbg;
};
using OSError_t = AuPair<AuUInt64, AuString>;
AuUInt32 GetOSErrorFence();
AuOptional<OSError_t> TryGetOrFetchOSError();
AuUInt32 GetCErrorFence();
AuOptional<int> TryGetOrFetchCError();
void ReportStackTrace(const StackTrace &trace);
AuOptional<OSError_t> TryFetchOSError();
AuOptional<int> TryFetchCError();
void CheckErrors();
void InitDebug();
}