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

5.0.3 • 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

988,416

Version

5.0.3

License

MIT

Unpacked Size

7.34 kB

Total Files

6

Last publish

Collaborators

  • pnpmuser
  • zkochan