/*** Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: Debug.hpp Date: 2021-6-12 Author: Reece ***/ #pragma once #if defined(STAGING) || defined(DEBUG) // not including ship -> do not spam end users with trash they do not understand, do not waste memory on debug cache #define _AU_USE_EXTENDED_FWD_FACING_DEBUGGING #endif namespace Aurora::Debug { struct LastError { AuUInt uAddress; EFailureCategory category; const char *pDbgMessage; AuUInt16 uLine; }; AuUInt32 GetOSErrorFence(); AuOptional TryGetOrFetchOSError(); AuUInt32 GetCErrorFence(); AuOptional TryGetOrFetchCError(); AuOptional TryFetchOSError(); AuOptional TryFetchCError(); AuUInt32 ReportStackTrace(const StackTrace &trace, const AuString &message); void CheckErrors(); void PlatformHandleFatal(bool fatal, bool bNoExit = false); void InitDebug(); }