From 0690aae09d1591b65d6808e6c6c547b63ddb3ce9 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 18 Oct 2018 00:48:07 +0200 Subject: Remove mostly unused writeFile implementation. --- solc/CommandLineInterface.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'solc/CommandLineInterface.cpp') diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index e0c6a2b6..844cef90 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -1118,7 +1118,15 @@ void CommandLineInterface::writeLinkedFiles() if (src.first == g_stdinFileName) cout << src.second << endl; else - writeFile(src.first, src.second); + { + ofstream outFile(src.first); + outFile << src.second; + if (!outFile) + { + cerr << "Could not write to file " << src.first << ". Aborting." << endl; + return; + } + } } string CommandLineInterface::libraryPlaceholderHint(string const& _libraryName) -- cgit v1.2.3