diff options
author | chriseth <c@ethdev.com> | 2015-09-22 01:43:56 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-09-22 02:03:53 +0800 |
commit | 42c0009205852abc2f2d7415a9e5faaf6e5b2d56 (patch) | |
tree | d88a500931a153eaa5a10b3fd883aa27652813c4 /solc/CommandLineInterface.cpp | |
parent | 39d1e2bc06a5c39180681c78e8f6618f25da2bce (diff) | |
download | dexon-solidity-42c0009205852abc2f2d7415a9e5faaf6e5b2d56.tar dexon-solidity-42c0009205852abc2f2d7415a9e5faaf6e5b2d56.tar.gz dexon-solidity-42c0009205852abc2f2d7415a9e5faaf6e5b2d56.tar.bz2 dexon-solidity-42c0009205852abc2f2d7415a9e5faaf6e5b2d56.tar.lz dexon-solidity-42c0009205852abc2f2d7415a9e5faaf6e5b2d56.tar.xz dexon-solidity-42c0009205852abc2f2d7415a9e5faaf6e5b2d56.tar.zst dexon-solidity-42c0009205852abc2f2d7415a9e5faaf6e5b2d56.zip |
Error formatting.
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r-- | solc/CommandLineInterface.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index cfc8a5e0..587dcded 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -490,7 +490,12 @@ 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>(); - m_compiler->compile(optimize, runs); + if (!m_compiler->compile(optimize, runs)) + { + for (auto const& error: m_compiler->errors()) + SourceReferenceFormatter::printExceptionInformation(cerr, *error, "Error", *m_compiler); + return false; + } m_compiler->link(m_libraries); } catch (ParserError const& _exception) |