aboutsummaryrefslogtreecommitdiffstats
path: root/solc/CommandLineInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r--solc/CommandLineInterface.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp
index e3c7620e..be10faa8 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -491,16 +491,15 @@ bool CommandLineInterface::processInput()
// TODO: Perhaps we should not compile unless requested
bool optimize = m_args.count("optimize") > 0;
unsigned runs = m_args["optimize-runs"].as<unsigned>();
- if (!m_compiler->compile(optimize, runs))
- {
- for (auto const& error: m_compiler->errors())
- SourceReferenceFormatter::printExceptionInformation(
- cerr,
- *error,
- (dynamic_pointer_cast<Warning const>(error)) ? "Warning" : "Error", *m_compiler
- );
+ bool successful = m_compiler->compile(optimize, runs);
+ for (auto const& error: m_compiler->errors())
+ SourceReferenceFormatter::printExceptionInformation(
+ cerr,
+ *error,
+ (dynamic_pointer_cast<Warning const>(error)) ? "Warning" : "Error", *m_compiler
+ );
+ if (!successful)
return false;
- }
m_compiler->link(m_libraries);
}
catch (ParserError const& _exception)