diff options
author | Federico Bond <federicobond@gmail.com> | 2017-10-27 04:56:00 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-02-19 22:04:22 +0800 |
commit | d7532f7b9c33cd191f400e9af34f4f06a4aef0fa (patch) | |
tree | 19b7d6768761c91cbb64bb6ff6a65940cfd88c66 /test/libsolidity/SolidityExecutionFramework.h | |
parent | 3f7e82d00ba6b0a9c1e7644b8613aa2126498893 (diff) | |
download | dexon-solidity-d7532f7b9c33cd191f400e9af34f4f06a4aef0fa.tar dexon-solidity-d7532f7b9c33cd191f400e9af34f4f06a4aef0fa.tar.gz dexon-solidity-d7532f7b9c33cd191f400e9af34f4f06a4aef0fa.tar.bz2 dexon-solidity-d7532f7b9c33cd191f400e9af34f4f06a4aef0fa.tar.lz dexon-solidity-d7532f7b9c33cd191f400e9af34f4f06a4aef0fa.tar.xz dexon-solidity-d7532f7b9c33cd191f400e9af34f4f06a4aef0fa.tar.zst dexon-solidity-d7532f7b9c33cd191f400e9af34f4f06a4aef0fa.zip |
Convert static SourceReferenceFormatter functions to member ones
Diffstat (limited to 'test/libsolidity/SolidityExecutionFramework.h')
-rw-r--r-- | test/libsolidity/SolidityExecutionFramework.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/libsolidity/SolidityExecutionFramework.h b/test/libsolidity/SolidityExecutionFramework.h index b0daaba9..b853d558 100644 --- a/test/libsolidity/SolidityExecutionFramework.h +++ b/test/libsolidity/SolidityExecutionFramework.h @@ -60,12 +60,13 @@ public: m_compiler.setOptimiserSettings(m_optimize, m_optimizeRuns); if (!m_compiler.compile()) { + auto scannerFromSourceName = [&](std::string const& _sourceName) -> solidity::Scanner const& { return m_compiler.scanner(_sourceName); }; + SourceReferenceFormatter formatter(std::cerr, scannerFromSourceName); + for (auto const& error: m_compiler.errors()) - SourceReferenceFormatter::printExceptionInformation( - std::cerr, + formatter.printExceptionInformation( *error, - (error->type() == Error::Type::Warning) ? "Warning" : "Error", - [&](std::string const& _sourceName) -> solidity::Scanner const& { return m_compiler.scanner(_sourceName); } + (error->type() == Error::Type::Warning) ? "Warning" : "Error" ); BOOST_ERROR("Compiling contract failed"); } |