0.0.4 • Published 7 years ago

apperr v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

apperr

Dead simple AppError class without any babeling or minification

The reason why this is exists at all

It's just helps you to avoid '../../'. You can use it like common Error object for your app. Or not :)

Usage example

import AppError from 'apperr'

try {
  throw new AppError('Hey ho, gonna catch me', {
    code: 31337
  })
} catch (err) {
  if (err instanceof AppError) {
    // do something
    console.log(err.meta.code) // 31337
  } else {
    // do something else
  }
}
0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago