AuroraRuntime/Source/Debug/Debug.hpp

34 lines
725 B
C++
Raw Normal View History

2021-06-27 21:25:29 +00:00
/***
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;
2021-06-27 21:25:29 +00:00
AuString dbg;
};
AuUInt32 GetOSErrorFence();
2021-09-06 10:58:08 +00:00
AuOptional<OSError_t> TryGetOrFetchOSError();
2021-06-27 21:25:29 +00:00
AuUInt32 GetCErrorFence();
AuOptional<AuUInt32> TryGetOrFetchCError();
2021-06-27 21:25:29 +00:00
2021-09-06 10:58:08 +00:00
AuOptional<OSError_t> TryFetchOSError();
AuOptional<AuUInt32> TryFetchCError();
2021-06-27 21:25:29 +00:00
AuUInt32 ReportStackTrace(const StackTrace &trace, const AuString &message);
2021-06-27 21:25:29 +00:00
void CheckErrors();
void PlatformHandleFatal(bool fatal);
2021-06-27 21:25:29 +00:00
void InitDebug();
}