diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-27 23:34:57 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-27 23:34:57 +0800 |
commit | b0485e327bfe229b4193c59ea490c7fac0dae7aa (patch) | |
tree | f6e6fcce58c273dc65e5a03727e799a4d87bc20d /libsolidity/interface | |
parent | 16276ab10b8f673fe9e4fe2a8e17bc752680ac8a (diff) | |
download | dexon-solidity-b0485e327bfe229b4193c59ea490c7fac0dae7aa.tar.gz dexon-solidity-b0485e327bfe229b4193c59ea490c7fac0dae7aa.tar.zst dexon-solidity-b0485e327bfe229b4193c59ea490c7fac0dae7aa.zip |
Make assembler errors fatal
Diffstat (limited to 'libsolidity/interface')
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 05ac483d..b09435a8 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -664,15 +664,11 @@ void CompilerStack::compileContract( } catch(eth::OptimizerException const&) { - auto err = make_shared<Error>(Error::Type::InternalCompilerError); - *err << errinfo_comment("Assembly optimizer exception for bytecode"); - m_errors.push_back(std::move(err); + BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Assembly optimizer exception for bytecode")); } catch(eth::AssemblyException const&) { - auto err = make_shared<Error>(Error::Type::InternalCompilerError); - *err << errinfo_comment("Assembly exception for bytecode"); - m_errors.push_back(std::move(err); + BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Assembly exception for bytecode")); } try @@ -681,15 +677,11 @@ void CompilerStack::compileContract( } catch(eth::OptimizerException const&) { - auto err = make_shared<Error>(Error::Type::InternalCompilerError); - *err << errinfo_comment("Assembly optimizer exception for deployed bytecode"); - m_errors.push_back(std::move(err); + BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Assembly optimizer exception for deployed bytecode")); } catch(eth::AssemblyException const&) { - auto err = make_shared<Error>(Error::Type::InternalCompilerError); - *err << errinfo_comment("Assembly exception for deployed bytecode"); - m_errors.push_back(std::move(err); + BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Assembly exception for deployed bytecode")); } compiledContract.onChainMetadata = onChainMetadata; |