mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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
This commit is contained in:
1 parent
0066a08aa8
commit
89b60ffbd4
47 files changed
+770
-707
No files matched your search
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user