{"maintainers":[{"name":"daaku","email":"n@daaku.org"}],"dist-tags":{"latest":"1.0.11"},"author":{"name":"Naitik Shah","email":"n@daaku.org"},"description":"A library to make errors.","readme":"makeerror [![Build Status](https://secure.travis-ci.org/nshah/nodejs-makeerror.png)](http://travis-ci.org/nshah/nodejs-makeerror)\n=========\n\nA library to make errors.\n\n\nBasics\n------\n\nMakes an Error constructor function with the signature below. All arguments are\noptional, and if the first argument is not a `String`, it will be assumed to be\n`data`:\n\n```javascript\nfunction(message, data)\n```\n\nYou'll typically do something like:\n\n```javascript\nvar makeError = require('makeerror')\nvar UnknownFileTypeError = makeError(\n  'UnknownFileTypeError',\n  'The specified type is not known.'\n)\nvar er = UnknownFileTypeError()\n```\n\n`er` will have a prototype chain that ensures:\n\n```javascript\ner instanceof UnknownFileTypeError\ner instanceof Error\n```\n\n\nTemplatized Error Messages\n--------------------------\n\nThere is support for simple string substitutions like:\n\n```javascript\nvar makeError = require('makeerror')\nvar UnknownFileTypeError = makeError(\n  'UnknownFileTypeError',\n  'The specified type \"{type}\" is not known.'\n)\nvar er = UnknownFileTypeError({ type: 'bmp' })\n```\n\nNow `er.message` or `er.toString()` will return `'The specified type \"bmp\" is\nnot known.'`.\n\n\nPrototype Hierarchies\n---------------------\n\nYou can create simple hierarchies as well using the `prototype` chain:\n\n```javascript\nvar makeError = require('makeerror')\nvar ParentError = makeError('ParentError')\nvar ChildError = makeError(\n  'ChildError',\n  'The child error.',\n  { proto: ParentError() }\n)\nvar er = ChildError()\n```\n\n`er` will have a prototype chain that ensures:\n\n```javascript\ner instanceof ChildError\ner instanceof ParentError\ner instanceof Error\n```\n","repository":{"type":"git","url":"https://github.com/daaku/nodejs-makeerror"},"bugs":{"url":"https://github.com/daaku/nodejs-makeerror/issues"},"license":"BSD-3-Clause","versions":{"1.0.0":{"name":"makeerror","description":"A library to make errors.","version":"1.0.0","author":{"name":"Naitik Shah","email":"n@daaku.org"},"main":"index","repository":{"type":"git","url":"git://github.com/nshah/nodejs-makeerror.git"},"scripts":{"test":"./node_modules/.bin/expresso"},"devDependencies":{"expresso":">= 0.8.1"},"engines":{"node":">= 0.4.1"},"_npmJsonOpts":{"file":"/Users/naitik/.npm/makeerror/1.0.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"makeerror@1.0.0","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.18","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"9a2e2cb9669b6a1c0060b325022feb6a375b0873","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/makeerror/-/makeerror-1.0.0.tgz"},"directories":{}},"1.0.1":{"name":"makeerror","description":"A library to make errors.","version":"1.0.1","author":{"name":"Naitik Shah","email":"n@daaku.org"},"main":"lib/makeerror","repository":{"type":"git","url":"git://github.com/nshah/nodejs-makeerror.git"},"scripts":{"test":"./node_modules/.bin/expresso -c"},"devDependencies":{"expresso":">= 0.8.1"},"engines":{"node":">= 0.4.1"},"_npmJsonOpts":{"file":"/Users/naitik/.npm/makeerror/1.0.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"makeerror@1.0.1","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.18","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"80d00385f0135dfe1560e3134250d7384176dffe","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/makeerror/-/makeerror-1.0.1.tgz"},"directories":{}},"1.0.2":{"name":"makeerror","description":"A library to make errors.","version":"1.0.2","author":{"name":"Naitik Shah","email":"n@daaku.org"},"main":"lib/makeerror","repository":{"type":"git","url":"git://github.com/nshah/nodejs-makeerror.git"},"scripts":{"test":"./node_modules/.bin/expresso -c"},"devDependencies":{"expresso":">= 0.8.1"},"engines":{"node":">= 0.4.1"},"_npmJsonOpts":{"file":"/Users/naitik/.npm/makeerror/1.0.2/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"makeerror@1.0.2","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"f3a9ed4737226e953e7a26e7d7a3231e6797aa43","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/makeerror/-/makeerror-1.0.2.tgz"},"maintainers":[{"name":"naitik","email":"n@daaku.org"}],"directories":{}},"1.0.3":{"name":"makeerror","description":"A library to make errors.","version":"1.0.3","author":{"name":"Naitik Shah","email":"n@daaku.org"},"main":"lib/makeerror","repository":{"type":"git","url":"git://github.com/nshah/nodejs-makeerror.git"},"scripts":{"test":"./node_modules/.bin/expresso -c"},"dependencies":{"tmpl":">= 1.0.0"},"devDependencies":{"expresso":">= 0.8.1"},"engines":{"node":">= 0.4.1"},"_npmJsonOpts":{"file":"/Users/naitik/.npm/makeerror/1.0.3/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"makeerror@1.0.3","_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"9cc5b2968436b18a57f78ca65619d48ba30f4c85","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/makeerror/-/makeerror-1.0.3.tgz"},"maintainers":[{"name":"naitik","email":"n@daaku.org"}],"directories":{}},"1.0.4":{"name":"makeerror","description":"A library to make errors.","version":"1.0.4","author":{"name":"Naitik Shah","email":"n@daaku.org"},"main":"lib/makeerror","repository":{"type":"git","url":"git://github.com/nshah/nodejs-makeerror.git"},"scripts":{"test":"./node_modules/.bin/expresso -c"},"dependencies":{"tmpl":">= 1.0.0"},"devDependencies":{"expresso":">= 0.8.1"},"engines":{"node":">= 0.4.1"},"_npmJsonOpts":{"file":"/Users/naitik/.npm/makeerror/1.0.4/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"makeerror@1.0.4","_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"97ad57bfd7d95669513a4a22f5bbc275c45c61ab","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/makeerror/-/makeerror-1.0.4.tgz"},"maintainers":[{"name":"naitik","email":"n@daaku.org"}],"directories":{}},"1.0.6":{"name":"makeerror","description":"A library to make errors.","version":"1.0.6","author":{"name":"Naitik Shah","email":"n@daaku.org"},"main":"lib/makeerror","repository":{"type":"git","url":"git://github.com/nshah/nodejs-makeerror.git"},"scripts":{"test":"./node_modules/.bin/expresso -c"},"dependencies":{"tmpl":">= 1.0.0"},"devDependencies":{"expresso":">= 0.8.1"},"engines":{"node":">= 0.4.1"},"_npmJsonOpts":{"file":"/Users/naitik/.npm/makeerror/1.0.6/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"makeerror@1.0.6","_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"e9e7a1b64b8f0190ce5dea6d813accfe9c9b08b7","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/makeerror/-/makeerror-1.0.6.tgz"},"maintainers":[{"name":"naitik","email":"n@daaku.org"}],"directories":{}},"1.0.7":{"name":"makeerror","description":"A library to make errors.","version":"1.0.7","author":{"name":"Naitik Shah","email":"n@daaku.org"},"main":"lib/makeerror","repository":{"type":"git","url":"git://github.com/nshah/nodejs-makeerror.git"},"scripts":{"test":"./node_modules/.bin/expresso -c"},"dependencies":{"tmpl":">= 1.0.0"},"devDependencies":{"expresso":">= 0.8.1"},"engines":{"node":">= 0.4.1"},"_npmJsonOpts":{"file":"/Users/naitik/.npm/makeerror/1.0.7/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"makeerror@1.0.7","_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"f2c7f0eb357e279d246bb71073ed3223a1580aec","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/makeerror/-/makeerror-1.0.7.tgz"},"maintainers":[{"name":"naitik","email":"n@daaku.org"}],"directories":{}},"1.0.8":{"name":"makeerror","description":"A library to make errors.","version":"1.0.8","author":{"name":"Naitik Shah","email":"n@daaku.org"},"main":"lib/makeerror","repository":{"type":"git","url":"git://github.com/nshah/nodejs-makeerror.git"},"scripts":{"test":"./node_modules/.bin/expresso -c"},"dependencies":{"tmpl":">= 1.0.0"},"devDependencies":{"expresso":">= 0.8.1"},"engines":{"node":">= 0.4.1"},"_npmJsonOpts":{"file":"/Users/naitik/.npm/makeerror/1.0.8/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"makeerror@1.0.8","_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"443ea6aa39021ae839daf5bd2190b6193258feb5","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/makeerror/-/makeerror-1.0.8.tgz"},"maintainers":[{"name":"naitik","email":"n@daaku.org"}],"directories":{}},"1.0.10":{"name":"makeerror","description":"A library to make errors.","version":"1.0.10","license":"BSD-3-Clause","author":{"name":"Naitik Shah","email":"n@daaku.org"},"main":"lib/makeerror","repository":{"type":"git","url":"http://github.com/nshah/nodejs-makeerror"},"scripts":{"test":"NODE_PATH=./lib mocha --ui exports"},"dependencies":{"tmpl":"1.0.x"},"devDependencies":{"mocha":"0.12.x"},"engines":{"node":"0.6.x"},"gitHead":"f14cd6dca95d12b0f1663f31cc3eb19e3dee754f","bugs":{"url":"https://github.com/nshah/nodejs-makeerror/issues"},"homepage":"https://github.com/nshah/nodejs-makeerror","_id":"makeerror@1.0.10","_shasum":"fcfe3b0dbce733fe5ec6797ee1116b50061730d2","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"daaku","email":"n@daaku.org"},"maintainers":[{"name":"daaku","email":"n@daaku.org"}],"dist":{"shasum":"fcfe3b0dbce733fe5ec6797ee1116b50061730d2","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/makeerror/-/makeerror-1.0.10.tgz"},"directories":{}},"1.0.11":{"name":"makeerror","description":"A library to make errors.","version":"1.0.11","license":"BSD-3-Clause","author":{"name":"Naitik Shah","email":"n@daaku.org"},"main":"lib/makeerror","repository":{"type":"git","url":"https://github.com/daaku/nodejs-makeerror"},"scripts":{"test":"NODE_PATH=./lib mocha --ui exports"},"dependencies":{"tmpl":"1.0.x"},"devDependencies":{"mocha":"0.12.x"},"gitHead":"06a15302cb11eb649a94ac0db6492c6e5eceb940","bugs":{"url":"https://github.com/daaku/nodejs-makeerror/issues"},"homepage":"https://github.com/daaku/nodejs-makeerror","_id":"makeerror@1.0.11","_shasum":"e01a5c9109f2af79660e4e8b9587790184f5a96c","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"daaku","email":"n@daaku.org"},"maintainers":[{"name":"daaku","email":"n@daaku.org"}],"dist":{"shasum":"e01a5c9109f2af79660e4e8b9587790184f5a96c","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/makeerror/-/makeerror-1.0.11.tgz"},"directories":{}}},"name":"makeerror","time":{"modified":"2015-03-28T18:31:38.982Z","created":"2011-07-24T19:31:22.107Z","1.0.0":"2011-07-24T19:31:22.640Z","1.0.1":"2011-07-27T17:18:02.013Z","1.0.2":"2011-08-08T01:45:42.619Z","1.0.3":"2011-08-08T02:39:17.143Z","1.0.4":"2011-08-17T04:12:07.567Z","1.0.6":"2011-08-17T20:32:28.284Z","1.0.7":"2011-08-17T20:36:05.662Z","1.0.8":"2011-08-17T21:03:48.622Z","1.0.10":"2015-03-04T18:09:39.616Z","1.0.11":"2015-03-28T18:31:38.982Z"},"readmeFilename":"readme.md","homepage":"https://github.com/daaku/nodejs-makeerror"}