diff options
author | 2021-03-17 15:48:49 -0400 | |
---|---|---|
committer | 2021-03-17 15:48:49 -0400 | |
commit | 48d73e3ab3a03509e2f2ac8720a4cd40633fb939 (patch) | |
tree | b9b44b0ef596571830c0046b4af0d7829dad1078 /src/compiler/utils/error.ts | |
parent | 458454dae5c34009679597b56384c59d5dd13905 (diff) | |
download | astro-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.ts | 2 |
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 }; |