summaryrefslogtreecommitdiff
path: root/lib/common/Guards.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-04-09 22:15:42 +0000
committerChris Wilson <chris+github@qwirx.com>2014-04-09 22:15:42 +0000
commit08a32e134b12529fd3ba5acacacf09113d3d0a9b (patch)
treedaf3884d4bb62b2bfe240c6e602432d61bd553a9 /lib/common/Guards.h
parent5e16bd3a7e4ce829d9daca45ce3d69cadd1caf9f (diff)
Improve error messages when FileHandleGuard fails to open a file.
Use the standard macros to report file error messages in the standard format, including a filename and message in the exception.
Diffstat (limited to 'lib/common/Guards.h')
-rw-r--r--lib/common/Guards.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/common/Guards.h b/lib/common/Guards.h
index cd2e4628..7ca1fbb6 100644
--- a/lib/common/Guards.h
+++ b/lib/common/Guards.h
@@ -37,9 +37,8 @@ public:
{
if(mOSFileHandle < 0)
{
- BOX_LOG_SYS_ERROR("FileHandleGuard: failed to open "
- "file '" << rFilename << "'");
- THROW_EXCEPTION(CommonException, OSFileOpenError)
+ THROW_SYS_FILE_ERROR("Failed to open file", rFilename,
+ CommonException, OSFileOpenError);
}
}