37 lines
787 B
C++
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();
|
|
}
|