{"_id":"2e","_rev":"3-1ce6ffe4b8ab33267df1cb78292d738e","name":"2e","description":"two-types and chain errors for user and bug","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"2e","description":"two-types and chain errors for user and bug","version":"1.0.0","homepage":"https://github.com/kiliwalk/2e","bugs":{"url":"https://github.com/kiliwalk/2e/issues"},"license":"MIT","main":"index.js","preferGlobal":false,"author":{"name":"kiliwalk","email":"kiliwalk@qq.com"},"repository":{"type":"git","url":"git+https://github.com/kiliwalk/2e.git"},"keywords":["chain errors","two-types errors","bug","user","error","fault","exception","error code"],"dependencies":{},"devDependencies":{"mocha":"^2.3.3"},"subdomain":"kiliwalk.org","engines":{},"scripts":{"test":"mocha -b --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter spec"},"gitHead":"6568cf55ebbf3f6fa104b48c84d7424075509512","_id":"2e@1.0.0","_shasum":"1a8a19744c4b16b0702750837d201989f18f244a","_from":".","_npmVersion":"2.13.5","_nodeVersion":"0.10.40","_npmUser":{"name":"kiliwalk","email":"kiliwalk@qq.com"},"dist":{"shasum":"1a8a19744c4b16b0702750837d201989f18f244a","tarball":"https://registry.npmjs.org/2e/-/2e-1.0.0.tgz","integrity":"sha512-o4BEjHbucpQmabf/pj2KTkvqpX1x0PKapDzO406gnk8Die+7ZM2DHQeoP0VMQnJEOf00Tys9rTNUkEwBwMRSyA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7sZ6KpCJg0vZZcMMRrtdJS7s7eczxhkXzVNYyKqzXBAIhAIprdxvb7ytmhxeZ0qdtWh0eeH5Ipkzhw5HQgmMOnwDH"}]},"maintainers":[{"name":"kiliwalk","email":"kiliwalk@qq.com"}]}},"readme":"two-types and chain errors for user and bug in node\r\n=================================\r\n\r\n```js\r\nvar e2 = require('2e'), UserError = e2.UserError, BugError = e2.BugError;\r\nthrow new UserError('xxx');\r\nthrow new UserError(400, 'xxx');\r\nthrow new UserError(err, 'xxx');//caused by another error `err`\r\nthrow new UserError(err, 400, 'xxx');\r\n```\r\n\r\n## License :\r\n\r\nLicensed under MIT\r\n\r\nCopyright (c) 2015 [kiliwalk](https://github.com/kiliwalk)\r\n","maintainers":[{"name":"kiliwalk","email":"kiliwalk@qq.com"}],"time":{"modified":"2022-06-12T14:06:55.839Z","created":"2015-09-25T16:29:32.784Z","1.0.0":"2015-09-25T16:29:32.784Z"},"homepage":"https://github.com/kiliwalk/2e","keywords":["chain errors","two-types errors","bug","user","error","fault","exception","error code"],"repository":{"type":"git","url":"git+https://github.com/kiliwalk/2e.git"},"author":{"name":"kiliwalk","email":"kiliwalk@qq.com"},"bugs":{"url":"https://github.com/kiliwalk/2e/issues"},"license":"MIT","readmeFilename":"README.md"}