mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-02-04 08:59:07 +00:00
feat(err): implement SErrSuppressError (#28)
Co-authored-by: fallenoak <git@fallenoak.me>
This commit is contained in:
parent
104f18a82a
commit
330ff647ff
2 changed files with 7 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static uint32_t s_lasterror = ERROR_SUCCESS;
|
static uint32_t s_lasterror = ERROR_SUCCESS;
|
||||||
|
static uint32_t s_suppress;
|
||||||
|
|
||||||
[[noreturn]] void SErrDisplayAppFatal(const char* format, ...) {
|
[[noreturn]] void SErrDisplayAppFatal(const char* format, ...) {
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
@ -85,3 +86,7 @@ void SErrSetLastError(uint32_t errorcode) {
|
||||||
uint32_t SErrGetLastError() {
|
uint32_t SErrGetLastError() {
|
||||||
return s_lasterror;
|
return s_lasterror;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SErrSuppressErrors(uint32_t suppress) {
|
||||||
|
s_suppress = suppress;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -116,4 +116,6 @@ void SErrSetLastError(uint32_t errorcode);
|
||||||
|
|
||||||
uint32_t SErrGetLastError();
|
uint32_t SErrGetLastError();
|
||||||
|
|
||||||
|
void SErrSuppressErrors(uint32_t suppress);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue