aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-10-06 03:18:46 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-10-06 03:18:46 +0800
commit475b81880185e816db9a962a06cb3c323b953a90 (patch)
treeba6e24f6be84b43a1f794936c9c9a1dab1ed4f46 /libsolidity
parented62b2583cf96a970dd610fa3ce837942bb67500 (diff)
downloaddexon-solidity-475b81880185e816db9a962a06cb3c323b953a90.tar
dexon-solidity-475b81880185e816db9a962a06cb3c323b953a90.tar.gz
dexon-solidity-475b81880185e816db9a962a06cb3c323b953a90.tar.bz2
dexon-solidity-475b81880185e816db9a962a06cb3c323b953a90.tar.lz
dexon-solidity-475b81880185e816db9a962a06cb3c323b953a90.tar.xz
dexon-solidity-475b81880185e816db9a962a06cb3c323b953a90.tar.zst
dexon-solidity-475b81880185e816db9a962a06cb3c323b953a90.zip
Remove obsolete createTypeError in AST
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/ast/AST.cpp6
-rw-r--r--libsolidity/ast/AST.h5
-rw-r--r--libsolidity/ast/Types.cpp2
3 files changed, 1 insertions, 12 deletions
diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp
index a805322b..1048b610 100644
--- a/libsolidity/ast/AST.cpp
+++ b/libsolidity/ast/AST.cpp
@@ -22,7 +22,6 @@
#include <libsolidity/ast/AST.h>
#include <libsolidity/ast/ASTVisitor.h>
-#include <libsolidity/interface/Exceptions.h>
#include <libsolidity/ast/AST_accept.h>
#include <libdevcore/SHA3.h>
@@ -73,11 +72,6 @@ ASTAnnotation& ASTNode::annotation() const
return *m_annotation;
}
-Error ASTNode::createTypeError(string const& _description) const
-{
- return Error(Error::Type::TypeError) << errinfo_sourceLocation(location()) << errinfo_comment(_description);
-}
-
SourceUnitAnnotation& SourceUnit::annotation() const
{
if (!m_annotation)
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h
index 75b8e946..733e7c78 100644
--- a/libsolidity/ast/AST.h
+++ b/libsolidity/ast/AST.h
@@ -26,7 +26,6 @@
#include <libsolidity/ast/ASTForward.h>
#include <libsolidity/parsing/Token.h>
#include <libsolidity/ast/Types.h>
-#include <libsolidity/interface/Exceptions.h>
#include <libsolidity/ast/ASTAnnotations.h>
#include <libsolidity/ast/ASTEnums.h>
@@ -89,10 +88,6 @@ public:
/// Returns the source code location of this node.
SourceLocation const& location() const { return m_location; }
- /// Creates a @ref TypeError exception and decorates it with the location of the node and
- /// the given description
- Error createTypeError(std::string const& _description) const;
-
///@todo make this const-safe by providing a different way to access the annotation
virtual ASTAnnotation& annotation() const;
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index ff5195ff..ee5f462b 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -2025,7 +2025,7 @@ unsigned EnumType::memberValue(ASTString const& _member) const
return index;
++index;
}
- BOOST_THROW_EXCEPTION(m_enum.createTypeError("Requested unknown enum value ." + _member));
+ solAssert(false, "Requested unknown enum value " + _member);
}
bool TupleType::isImplicitlyConvertibleTo(Type const& _other) const