mirror of
https://github.com/pnpm/pnpm.git
synced 2026-01-28 16:52:13 -05:00
* fix: forward existing `$NODE_OPTIONS` when running jest * chore: update `package.json` files for meta-updater changes --------- Co-authored-by: Zoltan Kochan <z@kochan.io>
@pnpm/error
An error class for pnpm errors
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