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 /test | |
parent | 24b2198668ad5d0b3f965bc34762bfac4004bcf2 (diff) |
fs/io/FileOutputStream: use C++ exceptions in Commit()
Diffstat (limited to 'test')
-rw-r--r-- | test/WriteFile.cxx | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/test/WriteFile.cxx b/test/WriteFile.cxx index 1366323c7..e762a9aa5 100644 --- a/test/WriteFile.cxx +++ b/test/WriteFile.cxx @@ -61,16 +61,12 @@ main(int argc, char **argv) const Path path = Path::FromFS(argv[1]); try { - Error error; FileOutputStream fos(path); if (!Copy(fos, STDIN_FILENO)) return EXIT_FAILURE; - if (!fos.Commit(error)) { - fprintf(stderr, "%s\n", error.GetMessage()); - return EXIT_FAILURE; - } + fos.Commit(); return EXIT_SUCCESS; } catch (const std::exception &e) { |