npm.io
0.0.8 • Published 6 years ago

@coolwallets/errors

Licence
ISC
Version
0.0.8
Deps
0
Size
74 kB
Vulns
0
Weekly
0

Errors

version

You can import our custom errors from this npm package.

Install

npm install coolwallets@errors

Usage

import { NotRegistered } from '@coolwallets/errors'
try {
  await wallet.createWallet(12)
} catch (error) {
  if  (error instanceof NotRegistered) {
    // popup Not Register Notification
  } else {
    throw error
  }
}