error2
More expressive error constructor
Last updated 6 years ago by lazurski .
GPL 3 · Original npm · Tarball · package.json
$ cnpm install error2 
SYNC missed versions from official npm registry.

More expressive error creation

For Node.js only ATM.

Usage:

  Error2 = require("error2");

  Error2();
  Error2(data);
  Error2(message);
  Error2(name, data);
  Error2(name, message);
  Error2(name, message, data);

where

  typeof name     === "string"
  typeof message  === "string"
  typeof data     === "object"

data object can contain name and message properties, which will therfore be used.

Please consult test cases for more funny and informative examples of use.

Current Tags

  • 0.2.2                                ...           latest (5 years ago)

6 Versions

  • 0.2.2                                ...           5 years ago
  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.4                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (3)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |