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

pull/4/head
Tatsuhiro Tsujikawa 2011-12-10 18:03:30 +09:00
parent 413b61c316
commit ebc082747c
1 changed files with 4 additions and 2 deletions

View File

@ -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);
}
}