aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/ReferencesResolver.h
diff options
context:
space:
mode:
authorRhett Aultman <roadriverrail@gmail.com>2017-05-11 21:26:35 +0800
committerRhett Aultman <roadriverrail@gmail.com>2017-05-30 22:28:31 +0800
commit89b60ffbd4c2dde26fa5e9f1d750729b5c89373e (patch)
treea4c464d4d40baaa260f071c1028f347bd287e44d /libsolidity/analysis/ReferencesResolver.h
parent0066a08aa8f6c469cde7947ec50ca662a32123a0 (diff)
downloaddexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.tar
dexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.tar.gz
dexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.tar.bz2
dexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.tar.lz
dexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.tar.xz
dexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.tar.zst
dexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.zip
Refactor error reporting
This commit introduces ErrorReporter, a utility class which consolidates all of the error logging functionality into a common set of functions. It also replaces all direct interactions with an ErrorList with calls to an ErrorReporter. This commit resolves issue #2209
Diffstat (limited to 'libsolidity/analysis/ReferencesResolver.h')
-rw-r--r--libsolidity/analysis/ReferencesResolver.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.h b/libsolidity/analysis/ReferencesResolver.h
index dce343d3..bbde19f9 100644
--- a/libsolidity/analysis/ReferencesResolver.h
+++ b/libsolidity/analysis/ReferencesResolver.h
@@ -33,6 +33,7 @@ namespace dev
namespace solidity
{
+class ErrorReporter;
class NameAndTypeResolver;
/**
@@ -43,11 +44,11 @@ class ReferencesResolver: private ASTConstVisitor
{
public:
ReferencesResolver(
- ErrorList& _errors,
+ ErrorReporter& _errorReporter,
NameAndTypeResolver& _resolver,
bool _resolveInsideCode = false
):
- m_errors(_errors),
+ m_errorReporter(_errorReporter),
m_resolver(_resolver),
m_resolveInsideCode(_resolveInsideCode)
{}
@@ -77,13 +78,10 @@ private:
/// Adds a new error to the list of errors and throws to abort type checking.
void fatalTypeError(SourceLocation const& _location, std::string const& _description);
- /// Adds a new error to the list of errors.
- void declarationError(const SourceLocation& _location, std::string const& _description);
-
/// Adds a new error to the list of errors and throws to abort type checking.
- void fatalDeclarationError(const SourceLocation& _location, std::string const& _description);
+ void fatalDeclarationError(SourceLocation const& _location, std::string const& _description);
- ErrorList& m_errors;
+ ErrorReporter& m_errorReporter;
NameAndTypeResolver& m_resolver;
/// Stack of return parameters.
std::vector<ParameterList const*> m_returnParameters;