Module deno_runtime::errors
source · [−]Expand description
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.