Properly override toString in CompileError

pull/1016/head
Efthymis Sarmpanis 7 years ago
parent e3b5f5250e
commit b1909dc19b

@ -24,7 +24,7 @@ export default class CompileError extends Error {
this.frame = getCodeFrame(template, line, column); this.frame = getCodeFrame(template, line, column);
} }
toString() { public toString = () => {
return `${this.message} (${this.loc.line}:${this.loc.column})\n${this return `${this.message} (${this.loc.line}:${this.loc.column})\n${this
.frame}`; .frame}`;
} }

Loading…
Cancel
Save