Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Combine CLI Errors. #2487
Outside of core::JSError, all other Deno errors are now combined to be just
I need to do further work on this PR, but wanted to get it visible to get any early feedback. Things I still need to do:
Ok, I have taken some artistic license with the errors to try to unify them, as neither TypeScript nor a coloured version of JSError work very well universally.
The biggest change is I took a hint from Rust errors which look something like this:
Where TypeScript pretty errors led with the file location of the error, that really breaks up being to read them because on average, we output very long file identifiers that identify local and remote resources.
A TypeScript error looks like this (but in colour):
Also, I have remapped the top line, start_column, end_column and line contents from JSErrors, so you get authored code instead of transpiled code.
Ok, I think this is ready for a final review @ry.
I didn't tackle the other error kinds display, as these are intrinsically Rust errors and are generally handled differently (usually via a