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:
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user