From 61749c94bd8a2ebcdfb89e0cd48c4a029a945079 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Mon, 21 Oct 2019 16:18:20 -0700 Subject: [PATCH] Chore: Provide debug log for parser errors (#12474) --- lib/linter/linter.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/linter/linter.js b/lib/linter/linter.js index 8bd29b94795..6d88cb5aa12 100644 --- a/lib/linter/linter.js +++ b/lib/linter/linter.js @@ -666,6 +666,8 @@ function parse(text, parser, providedParserOptions, filePath) { // If the message includes a leading line number, strip it: const message = `Parsing error: ${ex.message.replace(/^line \d+:/iu, "").trim()}`; + debug("%s\n%s", message, ex.stack); + return { success: false, error: {