Ver Fonte

common: common_funcs: Log error on R_UNLESS.

bunnei há 5 anos atrás
pai
commit
091e9e8c41
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      src/common/common_funcs.h

+ 3 - 0
src/common/common_funcs.h

@@ -97,6 +97,9 @@ __declspec(dllimport) void __stdcall DebugBreak(void);
 #define R_UNLESS(expr, res)                                                                        \
     {                                                                                              \
         if (!(expr)) {                                                                             \
+            if (res.IsError()) {                                                                   \
+                LOG_CRITICAL(Kernel, "Failed with error {}", res.raw);                             \
+            }                                                                                      \
             return res;                                                                            \
         }                                                                                          \
     }