aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-01-26 20:45:23 +0800
committerchriseth <c@ethdev.com>2017-01-26 20:45:23 +0800
commit1b097fd3c795dc5f0e100858a45b2efd8efc59b8 (patch)
tree5fbe1e5b0188d1cfdf92e19e44f203867f5600bf
parentba9a04500217e301bec63cab4e0c0f1d9322646d (diff)
downloaddexon-solidity-1b097fd3c795dc5f0e100858a45b2efd8efc59b8.tar.gz
dexon-solidity-1b097fd3c795dc5f0e100858a45b2efd8efc59b8.tar.zst
dexon-solidity-1b097fd3c795dc5f0e100858a45b2efd8efc59b8.zip
Proper error reporting for assembly mode.
-rw-r--r--solc/CommandLineInterface.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp
index e49e8517..0a6c17fe 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -921,6 +921,7 @@ bool CommandLineInterface::assemble()
m_assemblyStacks[src.first].assemble();
}
for (auto const& stack: m_assemblyStacks)
+ {
for (auto const& error: stack.second.errors())
SourceReferenceFormatter::printExceptionInformation(
cerr,
@@ -928,6 +929,9 @@ bool CommandLineInterface::assemble()
(error->type() == Error::Type::Warning) ? "Warning" : "Error",
[&](string const& _source) -> Scanner const& { return *scanners.at(_source); }
);
+ if (!Error::containsOnlyWarnings(stack.second.errors()))
+ successful = false;
+ }
return successful;
}