Skip to content

About

A tool method to catch async function errors.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

async-error-captured

A tool method to catch async function errors.

install

$ npm install async-error-captured --save

Or

$ yarn add async-error-captured

Usage

const errorCaptured = require('async-error-captured');

const handleFunc = async () => {
  const [err, res] = await errorCaptured(asyncFunc, args1, args2, ...);
  if (err) {
    throw new Error(err);
  }
  console.log(res);
}

License

MIT

About

A tool method to catch async function errors.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages