aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Cesar <nico@incocesar.com>2014-06-05 09:27:29 +0800
committerNico Cesar <nico@incocesar.com>2014-06-05 09:27:29 +0800
commitf996766314e2680ca83b001621d3f59ad6db4d0f (patch)
treeea555b7f3d6e4bef4e6583da07f18d5a87403cc0
parentf781485d28d85de05904deec393956c58c6fca49 (diff)
downloaddexon-solidity-f996766314e2680ca83b001621d3f59ad6db4d0f.tar.gz
dexon-solidity-f996766314e2680ca83b001621d3f59ad6db4d0f.tar.zst
dexon-solidity-f996766314e2680ca83b001621d3f59ad6db4d0f.zip
make life easier for Makefiles
-rw-r--r--main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index e304cb5c..be4ea8c0 100644
--- a/main.cpp
+++ b/main.cpp
@@ -98,7 +98,7 @@ int main(int argc, char** argv)
vector<string> errors;
if (src.empty())
- cerr << "Empty file." << endl;
+ errors.push_back("Empty file.");
else if (mode == Disassemble)
{
cout << disassemble(fromHex(src)) << endl;
@@ -117,6 +117,7 @@ int main(int argc, char** argv)
cout << compileLLLToAsm(src, optimise ? true : false, &errors) << endl;
for (auto const& i: errors)
cerr << i << endl;
-
+ if ( errors.size() )
+ return 1;
return 0;
}