Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/dtils/errors.ts

The best unofficial library of utilities for Deno applications
Go to Latest
import * as dtils from "https://deno.land/x/dtils@2.4.0/errors.ts";

Functions

Bind error recovery to fn, which is expected to be a function. If when the function is later called and errors, recoverWith will be returned instead.

Modifies the message field of error to be prepended with prepend

Call fn. If it throws, delay for delayTime, then call it again, up to retryCount times.

Call fn, returning its result, but return recoverWith if it errors. If fn doesn't return a promise, use withErrorRecovery instead

Call fn, returning its result, but return recoverWith if it errors. If fn returns a promise, use withAsyncErrorRecovery