diff options
Diffstat (limited to 'libjulia/optimiser/MainFunction.cpp')
-rw-r--r-- | libjulia/optimiser/MainFunction.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libjulia/optimiser/MainFunction.cpp b/libjulia/optimiser/MainFunction.cpp index 0b3e674b..bcd2f178 100644 --- a/libjulia/optimiser/MainFunction.cpp +++ b/libjulia/optimiser/MainFunction.cpp @@ -22,11 +22,10 @@ #include <libjulia/optimiser/MainFunction.h> #include <libjulia/optimiser/NameCollector.h> +#include <libjulia/Exceptions.h> #include <libsolidity/inlineasm/AsmData.h> -#include <libsolidity/interface/Exceptions.h> - #include <libdevcore/CommonData.h> using namespace std; @@ -36,12 +35,12 @@ using namespace dev::solidity; void MainFunction::operator()(Block& _block) { - solAssert(_block.statements.size() >= 1, ""); - solAssert(_block.statements[0].type() == typeid(Block), ""); + assertThrow(_block.statements.size() >= 1, OptimizerException, ""); + assertThrow(_block.statements[0].type() == typeid(Block), OptimizerException, ""); for (size_t i = 1; i < _block.statements.size(); ++i) - solAssert(_block.statements.at(i).type() == typeid(FunctionDefinition), ""); + assertThrow(_block.statements.at(i).type() == typeid(FunctionDefinition), OptimizerException, ""); /// @todo this should handle scopes properly and instead of an assertion it should rename the conflicting function - solAssert(NameCollector(_block).names().count("main") == 0, ""); + assertThrow(NameCollector(_block).names().count("main") == 0, OptimizerException, ""); Block& block = boost::get<Block>(_block.statements[0]); FunctionDefinition main{ |