WebContent+LibWeb/CSS: Add debug request to dump CSS errors

This commit is contained in:
Sam Atkins 2025-07-23 11:29:03 +01:00
commit 1adddb158a
Notes: github-actions[bot] 2025-08-04 09:51:44 +00:00
3 changed files with 17 additions and 1 deletions

View file

@ -64,4 +64,13 @@ void ErrorReporter::report(ParsingError&& error)
m_errors.set(move(error), { .occurrences = 1 });
}
void ErrorReporter::dump() const
{
// TODO: Organise this in some way?
dbgln("{} CSS errors reported:", m_errors.size());
for (auto const& [error, metadata] : m_errors) {
dbgln("- {} ({} occurrences)", serialize_parsing_error(error), metadata.occurrences);
}
}
}