From 7eae3bc8c530069e86026bf9d259e9a5ce9e4bce Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 16 Dec 2015 00:24:41 +0100 Subject: fs/io/FileOutputStream: use C++ exceptions in Commit() --- test/WriteFile.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'test/WriteFile.cxx') 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) { -- cgit v1.2.3