@pnpm/error
v1000.0.1
Published
An error class for pnpm errors
Downloads
4,612,598
Readme
@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