@pnpm/error
TypeScript icon, indicating that this package has built-in type declarations

6.0.2 • Public • Published

@pnpm/error

An error class for pnpm errors

npm version

Installation

pnpm add @pnpm/error

Usage

import { PnpmError } from '@pnpm/error'

try {
    throw new PnpmError('THE_ERROR_CODE', 'The error message')
} catch (err: any) { // eslint-disable-line
    console.log(err.code)
    //> ERR_PNPM_THE_ERROR_CODE
    console.log(err.message)
    //> The error message
}

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @pnpm/error

Weekly Downloads

1,114,071

Version

6.0.2

License

MIT

Unpacked Size

7.82 kB

Total Files

6

Last publish

Collaborators

  • pnpmuser
  • zkochan