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:
Rhett Aultman
2017-05-30 07:28:31 -07:00
parent 0066a08aa8
commit 89b60ffbd4
47 changed files with 770 additions and 707 deletions
+3 -2
View File
@@ -21,8 +21,8 @@
#pragma once
#include <libsolidity/interface/Exceptions.h>
#include <libsolidity/inlineasm/AsmAnalysisInfo.h>
#include <libsolidity/interface/ErrorReporter.h>
#include <libevmasm/LinkerObject.h>
#include <string>
@@ -50,7 +50,7 @@ public:
enum class Machine { EVM, EVM15, eWasm };
explicit AssemblyStack(Language _language = Language::Assembly):
m_language(_language)
m_language(_language), m_errorReporter(m_errors)
{}
/// @returns the scanner used during parsing
@@ -79,6 +79,7 @@ private:
std::shared_ptr<assembly::Block> m_parserResult;
std::shared_ptr<assembly::AsmAnalysisInfo> m_analysisInfo;
ErrorList m_errors;
ErrorReporter m_errorReporter;
};
}