fs/FileSystem: RemoveFile() throws exception on error

This commit is contained in:
Max Kellermann
2016-08-15 22:25:15 +02:00
parent 14d3da0e18
commit ea0e6d9824
8 changed files with 48 additions and 22 deletions

View File

@@ -87,10 +87,10 @@ FifoOutput::Delete()
FormatDebug(fifo_output_domain,
"Removing FIFO \"%s\"", path_utf8.c_str());
if (!RemoveFile(path)) {
FormatErrno(fifo_output_domain,
"Could not remove FIFO \"%s\"",
path_utf8.c_str());
try {
RemoveFile(path);
} catch (const std::runtime_error &e) {
LogError(e, "Could not remove FIFO");
return;
}