From 32ebc075b66030dcb13ad1a012012cf7543e26eb Mon Sep 17 00:00:00 2001 From: Marcos Caceres Date: Mon, 20 Feb 2017 14:30:41 +1100 Subject: [PATCH] fix(core/webidl-contiguous): improve parser error message (closes #1057) --- js/core/webidl-contiguous.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/core/webidl-contiguous.js b/js/core/webidl-contiguous.js index 0fd1525e02..6d40a4b033 100644 --- a/js/core/webidl-contiguous.js +++ b/js/core/webidl-contiguous.js @@ -980,7 +980,7 @@ define( try { parse = webidl2.parse($(this).text(), { ws: true }); } catch (e) { - pubsubhub.pub("error", "Failed to parse
" + $idl.text() + "
as IDL: " + (e.stack || e)); + pubsubhub.pub("error", "Failed to parse WebIDL: \n```\n" + this.textContent + "\n```\n" + (e.message || e)) + "."; // Skip this
 and move on to the next one.
             return;
           }