aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-07-13 22:56:03 +0800
committerGitHub <noreply@github.com>2017-07-13 22:56:03 +0800
commitd1c3ecc94a4c0b36ccfd310a0ccf15e9e9b4a8dd (patch)
tree155c3b7479401e114faa7d2c6bccdfcb7ead866c /libsolidity
parent32247fd02800f5fce3a5dd2e8f186a5882447d0d (diff)
parent09e821619e20943af7bbd61ad10fb5ae40d2558c (diff)
downloaddexon-solidity-d1c3ecc94a4c0b36ccfd310a0ccf15e9e9b4a8dd.tar
dexon-solidity-d1c3ecc94a4c0b36ccfd310a0ccf15e9e9b4a8dd.tar.gz
dexon-solidity-d1c3ecc94a4c0b36ccfd310a0ccf15e9e9b4a8dd.tar.bz2
dexon-solidity-d1c3ecc94a4c0b36ccfd310a0ccf15e9e9b4a8dd.tar.lz
dexon-solidity-d1c3ecc94a4c0b36ccfd310a0ccf15e9e9b4a8dd.tar.xz
dexon-solidity-d1c3ecc94a4c0b36ccfd310a0ccf15e9e9b4a8dd.tar.zst
dexon-solidity-d1c3ecc94a4c0b36ccfd310a0ccf15e9e9b4a8dd.zip
Merge pull request #2567 from ethereum/refactorExceptions
Refactor exceptions and provide comment function.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/ast/AST.h17
-rw-r--r--libsolidity/inlineasm/AsmScopeFiller.cpp2
-rw-r--r--libsolidity/interface/Exceptions.cpp13
3 files changed, 13 insertions, 19 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h
index f90a9b2f..cde14ea0 100644
--- a/libsolidity/ast/AST.h
+++ b/libsolidity/ast/AST.h
@@ -23,19 +23,24 @@
#pragma once
-#include <string>
-#include <vector>
-#include <memory>
-#include <boost/noncopyable.hpp>
-#include <libevmasm/SourceLocation.h>
-#include <libevmasm/Instruction.h>
#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 <libevmasm/SourceLocation.h>
+#include <libevmasm/Instruction.h>
+
+#include <libdevcore/FixedHash.h>
#include <json/json.h>
+#include <boost/noncopyable.hpp>
+
+#include <string>
+#include <vector>
+#include <memory>
+
namespace dev
{
namespace solidity
diff --git a/libsolidity/inlineasm/AsmScopeFiller.cpp b/libsolidity/inlineasm/AsmScopeFiller.cpp
index 5b3174b8..b70ae9ac 100644
--- a/libsolidity/inlineasm/AsmScopeFiller.cpp
+++ b/libsolidity/inlineasm/AsmScopeFiller.cpp
@@ -27,6 +27,8 @@
#include <libsolidity/interface/ErrorReporter.h>
#include <libsolidity/interface/Exceptions.h>
+#include <libdevcore/CommonData.h>
+
#include <boost/range/adaptor/reversed.hpp>
#include <memory>
diff --git a/libsolidity/interface/Exceptions.cpp b/libsolidity/interface/Exceptions.cpp
index 9f2a2d06..a837dce6 100644
--- a/libsolidity/interface/Exceptions.cpp
+++ b/libsolidity/interface/Exceptions.cpp
@@ -67,16 +67,3 @@ Error::Error(Error::Type _type, const std::string& _description, const SourceLoc
*this << errinfo_sourceLocation(_location);
*this << errinfo_comment(_description);
}
-
-string Exception::lineInfo() const
-{
- char const* const* file = boost::get_error_info<boost::throw_file>(*this);
- int const* line = boost::get_error_info<boost::throw_line>(*this);
- string ret;
- if (file)
- ret += *file;
- ret += ':';
- if (line)
- ret += boost::lexical_cast<string>(*line);
- return ret;
-}