{
  "_from": "iced-error@0.0.9",
  "_id": "iced-error@0.0.9",
  "_location": "/keybase/iced-error",
  "_phantomChildren": {},
  "_requiredBy": [
    "/keybase",
    "/keybase/bitcoyne",
    "/keybase/codesign",
    "/keybase/gpg-wrapper",
    "/keybase/iced-db",
    "/keybase/iced-utils",
    "/keybase/kbpgp",
    "/keybase/keybase-proofs",
    "/keybase/libkeybase",
    "/keybase/merkle-tree",
    "/keybase/pgp-utils",
    "/keybase/spotty",
    "/keybase/triplesec"
  ],
  "_shasum": "c7c3057614c0a187d96b3d18c6d520e6b872ed37",
  "_shrinkwrap": null,
  "bugs": {
    "url": "https://github.com/maxtaco/iced-error/issues"
  },
  "dependencies": {},
  "description": "An error-handling class written with/for IcedCoffeeScript",
  "devDependencies": {
    "iced-coffee-script": "^1.7.1-c"
  },
  "gitHead": "cf640b7066da3e14f1a7967c9713fab1bc6bf0fc",
  "homepage": "https://github.com/maxtaco/iced-error",
  "licenses": [
    {
      "type": "MIT",
      "url": "http://www.opensource.org/licenses/mit-license.php"
    }
  ],
  "main": "./index.js",
  "name": "iced-error",
  "optionalDependencies": {},
  "readme": "\n# IcedErrors\n\nAn integrated error system for dealing with errors, written for\nand with IcedCoffeeScript.  I found myself doing this stuff everytime\nI wrote a new project, so better to standardize it.\n\n## Enumerated Error Types\n\nIn your `lib/error.iced` file:\n\n```coffeescript\n\n{make_errors} = require 'iced-error'\nexports.E = make_errors\n  NOT_FOUND : \"Requested resource was not found\"\n  BAD_MAC : \"MAC failed on header\"\n  INVAL : \"Invalid value\"\n  DB_INSERT : \"Error inserting into the database\"  \n```\n\nIn your `foo.iced` file:\n\n```coffeescript\n{E} = require './lib/error'\n\nconsole.log E.OK                # prints 0\nconsole.log E.NOT_FOUND         # prints 100\nconsole.log E.msg[E.NOT_FOUND]  # prints \"Requested resource was not found\"\nconsole.log E.msg.NOT_FOUND]    # prints \"Requested resource was not found\"\nconsole.log E.name.NOT_FOUND    # prints \"NOT_FOUND\"\nconsole.log E.name[E.NOT_FOUND] # prints \"NOT_FOUND\"\n```\n\nYou can also use predefined Error classes:\n\n```coffeescript\n{E} = require './lib/error'\n\n# You can throw these errors too\nthrow new E.NotFoundError(\"your file\") \n\n# Will print [NotFoundError: your file (code 100)]\nconsole.log new E.NotFoundError \"your file\"\n\n# Will print \"your file\"\nconsole.log (new E.NotFoundError \"your file\").message\n\n# Will print 100\nconsole.log (new E.NotFoundError \"your file\").code\n```\n\n## Error Short Circuiters\n\nCatch errors all at once, not everywhere! \n\n```coffeescript\n{make_esc} = require 'iced-error'\nmy_fn = (cb) ->\n  esc = make_esc gcb, \"my_fn\"\n  await socket.get 'image id', esc defer id\n  await Image.findById id, esc defer image\n  await check_permissions user, image, esc defer permitted\n  gcb null, image\n```\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/maxtaco/iced-error.git"
  },
  "scripts": {},
  "version": "0.0.9"
}
