refactor(error): make error variables properly static

This commit is contained in:
phaneron 2024-09-07 12:26:26 -04:00
parent 57430d406f
commit 6cbf0d23bf
5 changed files with 74 additions and 74 deletions

View file

@ -3,13 +3,19 @@
#include <cstdint>
struct APPFATINFO {
const char *filename;
int32_t linenumber;
uintptr_t threadId;
};
#include "storm/error/Macro.hpp"
#include "storm/error/Codes.hpp"
extern uint32_t s_lasterror;
extern APPFATINFO s_appFatInfo;
[[noreturn]] void SErrDisplayAppFatal(const char* format, ...);
int32_t SErrDisplayError(uint32_t errorcode, const char* filename, int32_t linenumber, const char* description, int32_t recoverable, uint32_t exitcode, uint32_t a7);
int32_t SErrDisplayErrorFmt(uint32_t errorcode, const char* filename, int32_t linenumber, int32_t recoverable, uint32_t exitcode, const char* format, ...);
void SErrPrepareAppFatal(const char* filename, int32_t linenumber);
void SErrSetLastError(uint32_t errorcode);
uint32_t SErrGetLastError();
#endif