aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libsolidity/interface/ErrorReporter.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/libsolidity/interface/ErrorReporter.cpp b/libsolidity/interface/ErrorReporter.cpp
index f7260d51..436cb64f 100644
--- a/libsolidity/interface/ErrorReporter.cpp
+++ b/libsolidity/interface/ErrorReporter.cpp
@@ -61,7 +61,8 @@ void ErrorReporter::warning(
void ErrorReporter::error(Error::Type _type, SourceLocation const& _location, string const& _description)
{
- abortIfExcessive();
+ if (_type != Error::Type::Warning)
+ abortIfExcessive();
auto err = make_shared<Error>(_type);
*err <<
@@ -73,7 +74,8 @@ void ErrorReporter::error(Error::Type _type, SourceLocation const& _location, st
void ErrorReporter::error(Error::Type _type, SourceLocation const& _location, SecondarySourceLocation const& _secondaryLocation, string const& _description)
{
- abortIfExcessive();
+ if (_type != Error::Type::Warning)
+ abortIfExcessive();
auto err = make_shared<Error>(_type);
*err <<
@@ -86,7 +88,12 @@ void ErrorReporter::error(Error::Type _type, SourceLocation const& _location, Se
void ErrorReporter::abortIfExcessive()
{
- if (m_errorList.size() > 256)
+ unsigned errorCount = 0;
+ for (auto const& error: m_errorList)
+ if (error->type() != Error::Type::Warning)
+ errorCount++;
+
+ if (errorCount > 256)
{
auto err = make_shared<Error>(Error::Type::Warning);
*err << errinfo_comment("There are more than 256 errors. Aborting.");