import { deno } from "https://deno.land/x/denoversion@v1.0.2/lib/lib.deno_runtime.d.ts";
const { DenoError } = deno;
A Deno specific error. The kind
property is set to a specific error code
which can be used to in application logic.
import { DenoError, ErrorKind } from "deno";
try {
somethingThatMightThrow();
} catch (e) {
if (e instanceof DenoError && e.kind === ErrorKind.Overflow) {
console.error("Overflow error!");
}
}
Constructors
new
DenoError(kind: T, msg: string)Type Parameters
T extends ErrorKind
Properties
readonly
kind: T