MCPcopy
hub / github.com/postcss/postcss / addToError

Method addToError

lib/node.js:91–101  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

89 }
90
91 addToError(error) {
92 error.postcssNode = this
93 if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) {
94 let s = this.source
95 error.stack = error.stack.replace(
96 /\n\s{4}at /,
97 `$&${s.input.from}:${s.start.line}:${s.start.column}$&`
98 )
99 }
100 return error
101 }
102
103 after(add) {
104 this.parent.insertAfter(this, add)

Callers 2

walkMethod · 0.80
handleErrorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected