0.0.6 • Published 6 years ago

exprs-error-handler v0.0.6

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
6 years ago

Error Handlers

Classes

  • HttpClientError - Default Error which extends Error class
  • Http404Error - Error to see if a resource is not found on the server, extends HttpClientError
  • Http400Error - Error to see if a bad request is sent to server, extends HttpClientError

Usage

const { HttpClientError, Http400Error, Http404Error } = require('exprs-error-handler');

function x() {
  throw new HttpClientError('Client');
}

function y() {
  throw new Http400Error('400');
}

function z() {
  throw new Http404Error('404');
}

try {
  x();
  y();
  z();
} catch (e) {
  console.log(e);
}

License

MIT © Kent Adrian Sato

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago