mirror of https://github.com/aria2/aria2
Log filename in the exception when AbstractDiskWriter::closeFile() failed.
parent
413b61c316
commit
ebc082747c
|
@ -86,7 +86,9 @@ void AbstractDiskWriter::closeFile()
|
||||||
fd_ = -1;
|
fd_ = -1;
|
||||||
if(r == -1) {
|
if(r == -1) {
|
||||||
int errNum = errno;
|
int errNum = errno;
|
||||||
throw DL_ABORT_EX3(errNum, fmt("Failed to close file: %s",
|
throw DL_ABORT_EX3(errNum,
|
||||||
|
fmt("Failed to close file %s, cause: %s",
|
||||||
|
filename_.c_str(),
|
||||||
util::safeStrerror(errNum).c_str()),
|
util::safeStrerror(errNum).c_str()),
|
||||||
error_code::FILE_IO_ERROR);
|
error_code::FILE_IO_ERROR);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue