summaryrefslogtreecommitdiff
path: root/src/compiler/utils/error.ts
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@matthewphillips.info> 2021-03-17 15:48:49 -0400
committerGravatar GitHub <noreply@github.com> 2021-03-17 15:48:49 -0400
commit48d73e3ab3a03509e2f2ac8720a4cd40633fb939 (patch)
treeb9b44b0ef596571830c0046b4af0d7829dad1078 /src/compiler/utils/error.ts
parent458454dae5c34009679597b56384c59d5dd13905 (diff)
downloadastro-48d73e3ab3a03509e2f2ac8720a4cd40633fb939.tar.gz
astro-48d73e3ab3a03509e2f2ac8720a4cd40633fb939.tar.zst
astro-48d73e3ab3a03509e2f2ac8720a4cd40633fb939.zip
Setup error logging and provide our first parse errors (#6)
This adds parse error in a nicely formatted way, and moves the existing console.logs into a fork of the Snowpack logger. The new logger is not a singleton and won't preformat the message.
Diffstat (limited to 'src/compiler/utils/error.ts')
-rw-r--r--src/compiler/utils/error.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/utils/error.ts b/src/compiler/utils/error.ts
index 5c2cf3732..438d8c500 100644
--- a/src/compiler/utils/error.ts
+++ b/src/compiler/utils/error.ts
@@ -3,7 +3,7 @@
import { locate } from 'locate-character';
import get_code_frame from './get_code_frame.js';
-class CompileError extends Error {
+export class CompileError extends Error {
code: string;
start: { line: number; column: number };
end: { line: number; column: number };