diff options
author | Max Kellermann <max@duempel.org> | 2015-12-16 00:24:41 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-12-16 00:33:33 +0100 |
commit | 7eae3bc8c530069e86026bf9d259e9a5ce9e4bce (patch) | |
tree | e71a55c8516b379586d90488ebf49d0f902af4b1 /src/StateFile.cxx | |
parent | 24b2198668ad5d0b3f965bc34762bfac4004bcf2 (diff) |
fs/io/FileOutputStream: use C++ exceptions in Commit()
Diffstat (limited to 'src/StateFile.cxx')
-rw-r--r-- | src/StateFile.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/StateFile.cxx b/src/StateFile.cxx index 8d17a1827..7c92ae0ee 100644 --- a/src/StateFile.cxx +++ b/src/StateFile.cxx @@ -92,10 +92,12 @@ StateFile::Write() try { Error error; FileOutputStream fos(path); - if (!Write(fos, error) || !fos.Commit(error)) { + if (!Write(fos, error)) { LogError(error); return; } + + fos.Commit(); } catch (const std::exception &e) { LogError(e); } |