aboutsummaryrefslogtreecommitdiffstats
path: root/solc/CommandLineInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r--solc/CommandLineInterface.cpp10
1 files changed, 9 insertions, 1 deletions
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)