瀏覽代碼

common: common_funcs: Log error on R_UNLESS.

bunnei 5 年之前
父節點
當前提交
091e9e8c41
共有 1 個文件被更改,包括 3 次插入0 次删除
  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;                                                                            \
         }                                                                                          \
     }