Skip to main content
Module

x/denoversion/lib/lib.deno_runtime.d.ts>deno.DenoError

Deno cli to manage and bump release versions.
Latest
class deno.DenoError
extends Error
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)

Properties

readonly
kind: T