Properly override toString in CompileError

pull/7738/head
Efthymis Sarmpanis 8 years ago
parent aa56cde383
commit 79b9fca5dc

@ -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