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