Skip to content

Commit

Permalink
Better error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Kian738 committed Oct 30, 2023
1 parent f2f1353 commit 38deb4b
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions Source/Boot/EFI/Libs.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ void PrintInt(UINT64 number);

#define WIDEN(x) L##x

#define EFI_CALL(function) \
do \
{ \
EFI_STATUS status = function; \
if (EFI_ERROR(status)) \
{ \
SetColor(EFI_RED); \
Print(L"Error during \""); \
Print(WIDEN(#function)); \
Print(L"\" ("); \
Print(GetErrorString(status)); \
Print(L", "); \
PrintInt(status); \
Print(L")"); \
ResetColor(); \
} \
#define EFI_CALL(function) \
do \
{ \
EFI_STATUS status = function; \
if (EFI_ERROR(status)) \
{ \
SetColor(EFI_RED); \
Print(L"The following error occured while executing \""); \
Print(WIDEN(#function)); \
Print(L"\": \""); \
Print(GetErrorString(status)); \
Print(L"\" ("); \
PrintInt(status); \
Print(L")"); \
ResetColor(); \
} \
} while (0)

#define ALLOC(buffer, size) \
Expand Down

0 comments on commit 38deb4b

Please sign in to comment.