#deno #mapping #error

deno_error_mapping

Error mapping for deno

1 unstable release

0.1.0 Jul 31, 2023

#92 in #mapping

MIT license

5KB

There are many types of errors in Deno:

  • AnyError: a generic wrapper that can encapsulate any type of error.
  • JsError: a container for the error message and stack trace for exceptions thrown in JavaScript code. We use this to pretty-print stack traces.
  • Diagnostic: these are errors that originate in TypeScript's compiler. They're similar to JsError, in that they have line numbers. But Diagnostics are compile-time type errors, whereas JsErrors are runtime exceptions.

Took some code from Deno and packaged them so you don't have to copy paste them

Should map errors correctly. See more in this issue.

Dependencies

~210MB
~4.5M SLoC