From 4fca88ed02c1f0b5208abf2420f73023de54c23e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 28 Mar 2008 22:18:44 +0000 Subject: Improve logging with macros that consistently output strerror(errno) and errno, replacing almost all use of strerror() in the main code. Log a more detailed error message before throwing an exception for some more system call failures. Make FileStream store its filename on all platforms, not just Windows. Wrap some long lines at less than 80 characters to improve readability. Fix some minor violations of coding standard (white space) and a typo in a comment. --- lib/common/Guards.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/common/Guards.h') diff --git a/lib/common/Guards.h b/lib/common/Guards.h index d2fb84e0..cd2e4628 100644 --- a/lib/common/Guards.h +++ b/lib/common/Guards.h @@ -37,8 +37,8 @@ public: { if(mOSFileHandle < 0) { - BOX_ERROR("FileHandleGuard: failed to open file '" << - rFilename << "': " << strerror(errno)); + BOX_LOG_SYS_ERROR("FileHandleGuard: failed to open " + "file '" << rFilename << "'"); THROW_EXCEPTION(CommonException, OSFileOpenError) } } -- cgit v1.2.3