Thanks to visit codestin.com
Credit goes to tsed.dev

Skip to content

catchError

@tsed/core

Usage

typescript
import { catchError } from "@tsed/core";

See /packages/core/src/utils/catchError.ts.

Overview

ts
function catchError<T extends Error>(cb: Function): T | undefined;

Description

Executes a callback and returns any thrown error, or undefined if no error occurred.

Released under the MIT License.