summaryrefslogtreecommitdiff
path: root/src/AbstractDiskWriter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/AbstractDiskWriter.cc')
-rw-r--r--src/AbstractDiskWriter.cc18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/AbstractDiskWriter.cc b/src/AbstractDiskWriter.cc
index 50f52701..11888bc0 100644
--- a/src/AbstractDiskWriter.cc
+++ b/src/AbstractDiskWriter.cc
@@ -59,10 +59,7 @@ AbstractDiskWriter::AbstractDiskWriter(const std::string& filename)
AbstractDiskWriter::~AbstractDiskWriter()
{
- try {
- closeFile();
- } catch(...) {
- }
+ closeFile();
}
void AbstractDiskWriter::openFile(off_t totalLength)
@@ -80,18 +77,9 @@ void AbstractDiskWriter::openFile(off_t totalLength)
void AbstractDiskWriter::closeFile()
{
- if(fd_ >= 0) {
- int r;
- while((r = close(fd_)) == -1 && errno == EINTR);
+ if(fd_ != -1) {
+ close(fd_);
fd_ = -1;
- if(r == -1) {
- int errNum = errno;
- 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);
- }
}
}