Napolean Paced Mischeviously

    error2

    0.2.2 • Public • Published

    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.

    Install

    npm i error2

    DownloadsWeekly Downloads

    0

    Version

    0.2.2

    License

    GPL 3

    Last publish

    Collaborators

    • lazurski