fs/io/FileOutputStream: use C++ exceptions in Commit()
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user