aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-10-24 18:42:44 +0800
committerChristian <c@ethdev.com>2014-10-24 18:42:44 +0800
commit1ae1fc66e2d02fc17d4148a553a59ead402b9f54 (patch)
tree4c7378c2d1568a1f4bbffc95ea41bc3529d46be9 /AST.cpp
parent094ee44f721054518ff384aef7cde1afe649636d (diff)
downloaddexon-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.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/AST.cpp b/AST.cpp
index 50c53bf3..357b9bd9 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -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()