From b41629dc088423eee590533e4cc94b7e6928dfc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 2 Aug 2005 12:13:11 +0000 Subject: [PATCH] Enabled the REPORT_ERROR() and RETURN_ERROR() macros also in non-debug mode (for now). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13879 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/Debug.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/Debug.h b/src/add-ons/kernel/file_systems/bfs/Debug.h index 8a55e2b221..3c5df72539 100644 --- a/src/add-ons/kernel/file_systems/bfs/Debug.h +++ b/src/add-ons/kernel/file_systems/bfs/Debug.h @@ -69,8 +69,9 @@ #define ASSERT(x) { if (!(x)) DEBUGGER(("bfs: assert failed: " #x "\n")); } #else #define PRINT(x) ; - #define REPORT_ERROR(status) ; - #define RETURN_ERROR(status) return status; + #define REPORT_ERROR(status) \ + __out("bfs: %s:%d: %s\n", __FUNCTION__, __LINE__, strerror(status)); + #define RETURN_ERROR(err) { status_t _status = err; if (_status < B_OK) REPORT_ERROR(_status); return _status;} #define FATAL(x) { __out("bfs: "); __out x; sync(); panic("BFS!\n"); } #define INFORM(x) { __out("bfs: "); __out x; } #define FUNCTION() ;