Skip to content

Commit 540ed08

Browse files
committed
Show parser on error
1 parent 21f5cf8 commit 540ed08

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/language-css/parser-postcss.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,9 @@ function parseWithParser(parse, text, options) {
536536
if (typeof e.line !== "number") {
537537
throw e;
538538
}
539-
throw createError("(postcss) " + e.name + " " + e.reason, { start: e });
539+
throw createError(`${options.parser} parser: ${e.name} ${e.reason}`, {
540+
start: e,
541+
});
540542
}
541543

542544
result = parseNestedCSS(addTypePrefix(result, "css-"), options);

0 commit comments

Comments
 (0)