浏览代码

Log filename in the exception when AbstractDiskWriter::closeFile() failed.

Tatsuhiro Tsujikawa 14 年之前
父节点
当前提交
ebc082747c
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/AbstractDiskWriter.cc

+ 4 - 2
src/AbstractDiskWriter.cc

@@ -86,8 +86,10 @@ void AbstractDiskWriter::closeFile()
     fd_ = -1;
     if(r == -1) {
       int errNum = errno;
-      throw DL_ABORT_EX3(errNum, fmt("Failed to close file: %s",
-                                     util::safeStrerror(errNum).c_str()),
+      throw DL_ABORT_EX3(errNum,
+                         fmt("Failed to close file %s, cause: %s",
+                             filename_.c_str(),
+                             util::safeStrerror(errNum).c_str()),
                          error_code::FILE_IO_ERROR);
     }
   }