Explorar el Código

common: common_funcs: Log error on R_UNLESS.

bunnei hace 5 años
padre
commit
091e9e8c41
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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;                                                                            \
         }                                                                                          \
     }