From d5f40c141b203eb12c4d6fa97418b1a8f0f789bd Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 12 Dec 2017 08:54:33 +0000 Subject: Limit the number of errors output in a single run to 256 --- libsolidity/interface/ErrorReporter.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libsolidity/interface/ErrorReporter.h') diff --git a/libsolidity/interface/ErrorReporter.h b/libsolidity/interface/ErrorReporter.h index a87db21d..6b3dc221 100644 --- a/libsolidity/interface/ErrorReporter.h +++ b/libsolidity/interface/ErrorReporter.h @@ -102,6 +102,8 @@ private: SourceLocation const& _location = SourceLocation(), std::string const& _description = std::string()); + void abortIfExcessive(); + ErrorList& m_errorList; }; -- cgit v1.2.3 From 43d2954de83af5f64f526fd36f1cd5c3b5299498 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 5 Apr 2018 15:34:03 +0200 Subject: Do not abort excessive warnings, just ignore them. --- libsolidity/interface/ErrorReporter.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libsolidity/interface/ErrorReporter.h') diff --git a/libsolidity/interface/ErrorReporter.h b/libsolidity/interface/ErrorReporter.h index 6b3dc221..d1a0030f 100644 --- a/libsolidity/interface/ErrorReporter.h +++ b/libsolidity/interface/ErrorReporter.h @@ -102,9 +102,16 @@ private: SourceLocation const& _location = SourceLocation(), std::string const& _description = std::string()); - void abortIfExcessive(); + // @returns true if error shouldn't be stored + bool checkForExcessiveErrors(Error::Type _type); ErrorList& m_errorList; + + unsigned m_errorCount = 0; + unsigned m_warningCount = 0; + + const unsigned c_maxWarningsAllowed = 256; + const unsigned c_maxErrorsAllowed = 256; }; -- cgit v1.2.3