aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/DocStringAnalyser.cpp
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/DocStringAnalyser.cpp
parent0066a08aa8f6c469cde7947ec50ca662a32123a0 (diff)
downloaddexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.tar.gz
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/DocStringAnalyser.cpp')
-rw-r--r--libsolidity/analysis/DocStringAnalyser.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/libsolidity/analysis/DocStringAnalyser.cpp b/libsolidity/analysis/DocStringAnalyser.cpp
index 58261144..6a8fa08e 100644
--- a/libsolidity/analysis/DocStringAnalyser.cpp
+++ b/libsolidity/analysis/DocStringAnalyser.cpp
@@ -23,6 +23,7 @@
#include <libsolidity/analysis/DocStringAnalyser.h>
#include <libsolidity/ast/AST.h>
+#include <libsolidity/interface/ErrorReporter.h>
#include <libsolidity/parsing/DocStringParser.h>
using namespace std;
@@ -110,7 +111,7 @@ void DocStringAnalyser::parseDocStrings(
DocStringParser parser;
if (_node.documentation() && !_node.documentation()->empty())
{
- if (!parser.parse(*_node.documentation(), m_errors))
+ if (!parser.parse(*_node.documentation(), m_errorReporter))
m_errorOccured = true;
_annotation.docTags = parser.tags();
}
@@ -121,8 +122,6 @@ void DocStringAnalyser::parseDocStrings(
void DocStringAnalyser::appendError(string const& _description)
{
- auto err = make_shared<Error>(Error::Type::DocstringParsingError);
- *err << errinfo_comment(_description);
- m_errors.push_back(err);
m_errorOccured = true;
+ m_errorReporter.docstringParsingError(_description);
}