diff options
author | Christian <c@ethdev.com> | 2014-10-24 18:42:44 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-10-24 18:42:44 +0800 |
commit | 1ae1fc66e2d02fc17d4148a553a59ead402b9f54 (patch) | |
tree | 4c7378c2d1568a1f4bbffc95ea41bc3529d46be9 /AST.cpp | |
parent | 094ee44f721054518ff384aef7cde1afe649636d (diff) | |
download | dexon-solidity-1ae1fc66e2d02fc17d4148a553a59ead402b9f54.tar dexon-solidity-1ae1fc66e2d02fc17d4148a553a59ead402b9f54.tar.gz dexon-solidity-1ae1fc66e2d02fc17d4148a553a59ead402b9f54.tar.bz2 dexon-solidity-1ae1fc66e2d02fc17d4148a553a59ead402b9f54.tar.lz dexon-solidity-1ae1fc66e2d02fc17d4148a553a59ead402b9f54.tar.xz dexon-solidity-1ae1fc66e2d02fc17d4148a553a59ead402b9f54.tar.zst dexon-solidity-1ae1fc66e2d02fc17d4148a553a59ead402b9f54.zip |
Use createTypeError everywhere and stream out Location.
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -257,8 +257,7 @@ void Statement::expectType(Expression& _expression, const Type& _expectedType) { _expression.checkTypeRequirements(); if (!_expression.getType()->isImplicitlyConvertibleTo(_expectedType)) - BOOST_THROW_EXCEPTION(TypeError() << errinfo_sourceLocation(_expression.getLocation()) - << errinfo_comment("Type not implicitly convertible to expected type.")); + BOOST_THROW_EXCEPTION(_expression.createTypeError("Type not implicitly convertible to expected type.")); //@todo provide more information to the exception } @@ -407,9 +406,7 @@ void FunctionCall::checkTypeRequirements() m_type = fun.getReturnParameterList()->getParameters().front()->getType(); } else - { BOOST_THROW_EXCEPTION(createTypeError("Type does not support invocation.")); - } } void MemberAccess::checkTypeRequirements() |