From 1b097fd3c795dc5f0e100858a45b2efd8efc59b8 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 26 Jan 2017 13:45:23 +0100 Subject: Proper error reporting for assembly mode. --- solc/CommandLineInterface.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'solc') 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; } -- cgit v1.2.3