{"_id":"egg-errors","_rev":"3018343","name":"egg-errors","description":"egg-errors provide two kinds of errors that is Error and Exception.","dist-tags":{"latest":"2.3.2"},"maintainers":[{"name":"akitasummer","email":""},{"name":"atian25","email":"atian25@qq.com"},{"name":"coolme200","email":""},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"eggjs-admin","email":""},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"gxkl","email":""},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"mansonchor","email":"113803644@qq.com"},{"name":"mansonchor.zzw","email":""},{"name":"popomore","email":""},{"name":"wanghx","email":"851094531@qq.com"}],"time":{"modified":"2023-11-02T08:19:35.000Z","created":"2018-08-21T11:17:37.501Z","2.3.2":"2022-12-18T04:21:53.433Z","2.3.1":"2022-02-22T03:17:13.496Z","2.3.0":"2021-10-26T02:31:39.081Z","2.2.3":"2021-07-29T14:01:37.470Z","2.2.2":"2021-04-06T13:25:23.679Z","2.2.1":"2021-03-29T08:47:14.780Z","2.2.0":"2021-03-22T14:11:48.001Z","2.1.1":"2019-12-02T07:53:09.801Z","2.1.0":"2018-12-26T13:31:16.789Z","2.0.1":"2018-12-17T14:44:59.955Z","2.0.0":"2018-12-11T10:32:19.145Z","1.0.1":"2018-08-21T11:21:25.923Z","1.0.0":"2018-08-21T11:17:37.501Z"},"users":{},"author":{"name":"popomore"},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/egg-errors.git"},"versions":{"2.3.2":{"name":"egg-errors","version":"2.3.2","description":"egg-errors provide two kinds of errors that is Error and Exception.","scripts":{"contributor":"git-contributor","test":"egg-bin test --typescript","cov":"egg-bin cov --typescript","tsc":"tsc -p tsconfig.json","ci":"npm run lint && npm run cov && npm run tsc","prepublishOnly":"npm run tsc","lint":"eslint . --ext .ts"},"main":"lib/index.js","types":"lib/index.d.ts","dependencies":{},"devDependencies":{"@types/mocha":"^2.2.40","@types/node":"^7.0.12","dedent":"^0.7.0","egg-bin":"^4.9.0","egg-mock":"^4.0.1","eslint":"^6","eslint-config-egg":"^9.0.0","git-contributor":"^1.0.10","statuses":"^1.5.0","toidentifier":"^1.0.0","typescript":"^3.2.2"},"engines":{"node":">=8.9.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/egg-errors.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"eslintIgnore":["coverage"],"author":{"name":"popomore"},"license":"MIT","gitHead":"babe728356b4d4150651785705a2d2267b0739ff","homepage":"https://github.com/eggjs/egg-errors#readme","_id":"egg-errors@2.3.2","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"shasum":"c40306e6b5796509d11e5496a181adca110055db","size":16638,"noattachment":false,"key":"/egg-errors/-/egg-errors-2.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-errors/download/egg-errors-2.3.2.tgz"},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"directories":{},"maintainers":[{"name":"akitasummer","email":""},{"name":"atian25","email":"atian25@qq.com"},{"name":"coolme200","email":""},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"eggjs-admin","email":""},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"gxkl","email":""},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"mansonchor","email":"113803644@qq.com"},{"name":"mansonchor.zzw","email":""},{"name":"popomore","email":""},{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-errors_2.3.2_1671337313223_0.8798048184344789"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-12-18T04:21:57.727Z","publish_time":1671337313433,"_cnpm_publish_time":1671337313433},"2.3.1":{"name":"egg-errors","version":"2.3.1","description":"[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down","scripts":{"test":"egg-bin test --typescript","cov":"egg-bin cov --typescript","tsc":"tsc -p tsconfig.json","ci":"npm run lint && npm run cov && npm run tsc","autod":"autod","prepublishOnly":"npm run tsc","lint":"eslint . --ext .ts"},"main":"lib/index.js","types":"lib/index.d.ts","dependencies":{},"devDependencies":{"@types/mocha":"^2.2.40","@types/node":"^7.0.12","autod":"^3.0.1","autod-egg":"^1.1.0","dedent":"^0.7.0","egg-bin":"^4.9.0","egg-ci":"^1.8.0","egg-mock":"^4.0.1","eslint":"^6","eslint-config-egg":"^9.0.0","statuses":"^1.5.0","toidentifier":"^1.0.0","typescript":"^3.2.2"},"engines":{"node":">=8.9.0"},"ci":{"type":"github","version":"8, 10, 12, 14, 16","license":true},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/egg-errors.git"},"eslintIgnore":["coverage"],"author":{"name":"popomore"},"license":"MIT","gitHead":"c69d43912d7e70d13912961cda795687ac01bb37","bugs":{"url":"https://github.com/eggjs/egg-errors/issues"},"homepage":"https://github.com/eggjs/egg-errors#readme","_id":"egg-errors@2.3.1","_nodeVersion":"16.12.0","_npmVersion":"6.14.15","dist":{"shasum":"af5de80eca6194d7c194396cc042dcef264683b5","size":18167,"noattachment":false,"key":"/egg-errors/-/egg-errors-2.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-errors/download/egg-errors-2.3.1.tgz"},"_npmUser":{"name":"mansonchor.zzw","email":"mansonchor1987@gmail.com"},"directories":{},"maintainers":[{"name":"akitasummer","email":""},{"name":"atian25","email":"atian25@qq.com"},{"name":"coolme200","email":""},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"eggjs-admin","email":""},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"gxkl","email":""},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"mansonchor","email":"113803644@qq.com"},{"name":"mansonchor.zzw","email":""},{"name":"popomore","email":""},{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-errors_2.3.1_1645499833361_0.738923923243741"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-02-22T03:17:19.208Z","publish_time":1645499833496,"_cnpm_publish_time":1645499833496},"2.3.0":{"name":"egg-errors","version":"2.3.0","description":"[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down","scripts":{"test":"egg-bin test --typescript","cov":"egg-bin cov --typescript","tsc":"tsc -p tsconfig.json","ci":"npm run lint && npm run cov && npm run tsc","autod":"autod","prepublishOnly":"npm run tsc","lint":"eslint . --ext .ts"},"main":"lib/index.js","types":"lib/index.d.ts","dependencies":{},"devDependencies":{"@types/mocha":"^2.2.40","@types/node":"^7.0.12","autod":"^3.0.1","autod-egg":"^1.1.0","dedent":"^0.7.0","egg-bin":"^4.9.0","egg-ci":"^1.8.0","egg-mock":"^4.0.1","eslint":"^6","eslint-config-egg":"^9.0.0","statuses":"^1.5.0","toidentifier":"^1.0.0","typescript":"^3.2.2"},"engines":{"node":">=8.9.0"},"ci":{"version":"8, 10","license":true},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/egg-errors.git"},"eslintIgnore":["coverage"],"author":{"name":"popomore"},"license":"MIT","gitHead":"f65bbf95504e0daf4012e2c9be072d7eb178c09b","bugs":{"url":"https://github.com/eggjs/egg-errors/issues"},"homepage":"https://github.com/eggjs/egg-errors#readme","_id":"egg-errors@2.3.0","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"shasum":"6da484d27a4a261d83b6d95c0c568c07ad7ea71c","size":18087,"noattachment":false,"key":"/egg-errors/-/egg-errors-2.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-errors/download/egg-errors-2.3.0.tgz"},"_npmUser":{"name":"mansonchor.zzw","email":"mansonchor1987@gmail.com"},"directories":{},"maintainers":[{"name":"akitasummer","email":""},{"name":"atian25","email":"atian25@qq.com"},{"name":"coolme200","email":""},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"eggjs-admin","email":""},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"gxkl","email":""},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"mansonchor","email":"113803644@qq.com"},{"name":"mansonchor.zzw","email":""},{"name":"popomore","email":""},{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-errors_2.3.0_1635215498928_0.6049250232893157"},"_hasShrinkwrap":false,"publish_time":1635215499081,"_cnpm_publish_time":1635215499081},"2.2.3":{"name":"egg-errors","version":"2.2.3","description":"[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down","scripts":{"test":"egg-bin test --typescript","cov":"egg-bin cov --typescript","tsc":"tsc -p tsconfig.json","ci":"npm run lint && npm run cov && npm run tsc","autod":"autod","prepublishOnly":"npm run tsc","lint":"eslint . --ext .ts"},"main":"lib/index.js","types":"lib/index.d.ts","dependencies":{},"devDependencies":{"@types/mocha":"^2.2.40","@types/node":"^7.0.12","autod":"^3.0.1","autod-egg":"^1.1.0","dedent":"^0.7.0","egg-bin":"^4.9.0","egg-ci":"^1.8.0","egg-mock":"^4.0.1","eslint":"^6","eslint-config-egg":"^9.0.0","statuses":"^1.5.0","toidentifier":"^1.0.0","typescript":"^3.2.2"},"engines":{"node":">=8.9.0"},"ci":{"version":"8, 10","license":true},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/egg-errors.git"},"eslintIgnore":["coverage"],"author":{"name":"popomore"},"license":"MIT","gitHead":"79d8a1e117a440a38a41dca4f7319f6590730b93","bugs":{"url":"https://github.com/eggjs/egg-errors/issues"},"homepage":"https://github.com/eggjs/egg-errors#readme","_id":"egg-errors@2.2.3","_nodeVersion":"12.13.0","_npmVersion":"6.14.8","dist":{"shasum":"1b4364ee535b44c862853f2b1653da228d9a15c5","size":17722,"noattachment":false,"key":"/egg-errors/-/egg-errors-2.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-errors/download/egg-errors-2.2.3.tgz"},"_npmUser":{"name":"mansonchor.zzw","email":"mansonchor1987@gmail.com"},"directories":{},"maintainers":[{"name":"akitasummer","email":""},{"name":"atian25","email":"atian25@qq.com"},{"name":"coolme200","email":""},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"eggjs-admin","email":""},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"gxkl","email":""},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"mansonchor","email":"113803644@qq.com"},{"name":"mansonchor.zzw","email":""},{"name":"popomore","email":""},{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-errors_2.2.3_1627567297329_0.5291735893747205"},"_hasShrinkwrap":false,"publish_time":1627567297470,"_cnpm_publish_time":1627567297470},"2.2.2":{"name":"egg-errors","version":"2.2.2","description":"[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down","scripts":{"test":"egg-bin test --typescript","cov":"egg-bin cov --typescript","tsc":"tsc -p tsconfig.json","ci":"npm run lint && npm run cov && npm run tsc","autod":"autod","prepublishOnly":"npm run tsc","lint":"eslint . --ext .ts"},"main":"lib/index.js","types":"lib/index.d.ts","dependencies":{},"devDependencies":{"@types/mocha":"^2.2.40","@types/node":"^7.0.12","autod":"^3.0.1","autod-egg":"^1.1.0","dedent":"^0.7.0","egg-bin":"^4.9.0","egg-ci":"^1.8.0","egg-mock":"^4.0.1","eslint":"^6","eslint-config-egg":"^9.0.0","statuses":"^1.5.0","toidentifier":"^1.0.0","typescript":"^3.2.2"},"engines":{"node":">=8.9.0"},"ci":{"version":"8, 10","license":true},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/egg-errors.git"},"eslintIgnore":["coverage"],"author":{"name":"popomore"},"license":"MIT","gitHead":"22942d12e865d17fb17dc2787d725083e5dce03d","bugs":{"url":"https://github.com/eggjs/egg-errors/issues"},"homepage":"https://github.com/eggjs/egg-errors#readme","_id":"egg-errors@2.2.2","_nodeVersion":"12.13.0","_npmVersion":"6.14.8","dist":{"shasum":"5e6f40cde7244dd5f3cd4d976db80c0033195557","size":17618,"noattachment":false,"key":"/egg-errors/-/egg-errors-2.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-errors/download/egg-errors-2.2.2.tgz"},"_npmUser":{"name":"mansonchor.zzw","email":"mansonchor1987@gmail.com"},"directories":{},"maintainers":[{"name":"akitasummer","email":""},{"name":"atian25","email":"atian25@qq.com"},{"name":"coolme200","email":""},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"eggjs-admin","email":""},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"gxkl","email":""},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"mansonchor","email":"113803644@qq.com"},{"name":"mansonchor.zzw","email":""},{"name":"popomore","email":""},{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-errors_2.2.2_1617715523560_0.5025028537702527"},"_hasShrinkwrap":false,"publish_time":1617715523679,"_cnpm_publish_time":1617715523679},"2.2.1":{"name":"egg-errors","version":"2.2.1","description":"[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down","scripts":{"test":"egg-bin test --typescript","cov":"egg-bin cov --typescript","tsc":"tsc -p tsconfig.json","ci":"npm run lint && npm run cov && npm run tsc","autod":"autod","prepublishOnly":"npm run tsc","lint":"eslint . --ext .ts"},"main":"lib/index.js","types":"lib/index.d.ts","dependencies":{},"devDependencies":{"@types/mocha":"^2.2.40","@types/node":"^7.0.12","autod":"^3.0.1","autod-egg":"^1.1.0","dedent":"^0.7.0","egg-bin":"^4.9.0","egg-ci":"^1.8.0","egg-mock":"^4.0.1","eslint":"^6","eslint-config-egg":"^9.0.0","statuses":"^1.5.0","toidentifier":"^1.0.0","typescript":"^3.2.2"},"engines":{"node":">=8.9.0"},"ci":{"version":"8, 10","license":true},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/egg-errors.git"},"eslintIgnore":["coverage"],"author":{"name":"popomore"},"license":"MIT","gitHead":"79bf0acdd7ac22819207dd61fb467b8c13acd30e","bugs":{"url":"https://github.com/eggjs/egg-errors/issues"},"homepage":"https://github.com/eggjs/egg-errors#readme","_id":"egg-errors@2.2.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.8","dist":{"shasum":"77556aa99b7fca868226a6a46e6bfe5c4a1641fe","size":17332,"noattachment":false,"key":"/egg-errors/-/egg-errors-2.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-errors/download/egg-errors-2.2.1.tgz"},"_npmUser":{"name":"mansonchor.zzw","email":"mansonchor1987@gmail.com"},"directories":{},"maintainers":[{"name":"akitasummer","email":""},{"name":"atian25","email":"atian25@qq.com"},{"name":"coolme200","email":""},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"eggjs-admin","email":""},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"gxkl","email":""},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"mansonchor","email":"113803644@qq.com"},{"name":"mansonchor.zzw","email":""},{"name":"popomore","email":""},{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-errors_2.2.1_1617007634644_0.21805586666437327"},"_hasShrinkwrap":false,"publish_time":1617007634780,"_cnpm_publish_time":1617007634780},"2.2.0":{"name":"egg-errors","version":"2.2.0","description":"[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down","scripts":{"test":"egg-bin test --typescript","cov":"egg-bin cov --typescript","tsc":"tsc -p tsconfig.json","ci":"npm run lint && npm run cov && npm run tsc","autod":"autod","prepublishOnly":"npm run tsc","lint":"eslint . --ext .ts"},"main":"lib/index.js","types":"lib/index.d.ts","dependencies":{},"devDependencies":{"@types/mocha":"^2.2.40","@types/node":"^7.0.12","autod":"^3.0.1","autod-egg":"^1.1.0","dedent":"^0.7.0","egg-bin":"^4.9.0","egg-ci":"^1.8.0","egg-mock":"^4.0.1","eslint":"^6","eslint-config-egg":"^9.0.0","statuses":"^1.5.0","toidentifier":"^1.0.0","typescript":"^3.2.2"},"engines":{"node":">=8.9.0"},"ci":{"version":"8, 10","license":true},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/egg-errors.git"},"eslintIgnore":["coverage"],"author":{"name":"popomore"},"license":"MIT","gitHead":"92d588ed885f6f0b7f3e75830f8deb77c47311e0","bugs":{"url":"https://github.com/eggjs/egg-errors/issues"},"homepage":"https://github.com/eggjs/egg-errors#readme","_id":"egg-errors@2.2.0","_nodeVersion":"12.13.0","_npmVersion":"6.14.8","dist":{"shasum":"c25ee92e0fffebe9f35295842adb6d709b93aa4c","size":17297,"noattachment":false,"key":"/egg-errors/-/egg-errors-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-errors/download/egg-errors-2.2.0.tgz"},"_npmUser":{"name":"mansonchor.zzw","email":"mansonchor@126.com"},"directories":{},"maintainers":[{"name":"akitasummer","email":""},{"name":"atian25","email":"atian25@qq.com"},{"name":"coolme200","email":""},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"eggjs-admin","email":""},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"gxkl","email":""},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"mansonchor","email":"113803644@qq.com"},{"name":"mansonchor.zzw","email":""},{"name":"popomore","email":""},{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-errors_2.2.0_1616422307861_0.609219589464179"},"_hasShrinkwrap":false,"publish_time":1616422308001,"_cnpm_publish_time":1616422308001},"2.1.1":{"name":"egg-errors","version":"2.1.1","description":"[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down","scripts":{"test":"egg-bin test --typescript","cov":"egg-bin cov --typescript","tsc":"tsc -p tsconfig.json","ci":"npm run lint && npm run cov && npm run tsc","autod":"autod","prepublishOnly":"npm run tsc","lint":"tslint --project tsconfig.json"},"main":"lib/index.js","types":"lib/index.d.ts","dependencies":{},"devDependencies":{"@types/mocha":"^2.2.40","@types/node":"^7.0.12","autod":"^3.0.1","autod-egg":"^1.1.0","dedent":"^0.7.0","egg-bin":"^4.9.0","egg-ci":"^1.8.0","statuses":"^1.5.0","toidentifier":"^1.0.0","tslint":"^5.11.0","tslint-config-egg":"^1.0.0","typescript":"^3.2.2"},"engines":{"node":">=8.9.0"},"ci":{"version":"8, 10","license":true},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/egg-errors.git"},"eslintIgnore":["coverage"],"author":{"name":"popomore"},"license":"MIT","gitHead":"4000f0277611cdf8f3722a7bd8e5a576648d2f99","bugs":{"url":"https://github.com/eggjs/egg-errors/issues"},"homepage":"https://github.com/eggjs/egg-errors#readme","_id":"egg-errors@2.1.1","_nodeVersion":"10.15.3","_npmVersion":"6.11.3","dist":{"shasum":"ceb8bf41ace4df10bb016e694d368ac4db6c77ff","size":14617,"noattachment":false,"key":"/egg-errors/-/egg-errors-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-errors/download/egg-errors-2.1.1.tgz"},"maintainers":[{"name":"akitasummer","email":""},{"name":"atian25","email":"atian25@qq.com"},{"name":"coolme200","email":""},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"eggjs-admin","email":""},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"gxkl","email":""},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"mansonchor","email":"113803644@qq.com"},{"name":"mansonchor.zzw","email":""},{"name":"popomore","email":""},{"name":"wanghx","email":"851094531@qq.com"}],"_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-errors_2.1.1_1575273189661_0.48349519423352194"},"_hasShrinkwrap":false,"publish_time":1575273189801,"_cnpm_publish_time":1575273189801},"2.1.0":{"name":"egg-errors","version":"2.1.0","description":"[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down","scripts":{"test":"egg-bin test --typescript","cov":"egg-bin cov --typescript","tsc":"tsc -p tsconfig.json","ci":"npm run lint && npm run cov && npm run tsc","autod":"autod","prepublishOnly":"npm run tsc","lint":"tslint --project tsconfig.json"},"main":"lib/index.js","types":"lib/index.d.ts","dependencies":{},"devDependencies":{"@types/mocha":"^2.2.40","@types/node":"^7.0.12","autod":"^3.0.1","autod-egg":"^1.1.0","dedent":"^0.7.0","egg-bin":"^4.9.0","egg-ci":"^1.8.0","statuses":"^1.5.0","toidentifier":"^1.0.0","tslint":"^5.11.0","tslint-config-egg":"^1.0.0","typescript":"^3.2.2"},"engines":{"node":">=8.9.0"},"ci":{"version":"8, 10","license":true},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/egg-errors.git"},"eslintIgnore":["coverage"],"author":{"name":"popomore"},"license":"MIT","gitHead":"d1e43eb5f279a6938a5dace4d4695afa4c3db5b9","bugs":{"url":"https://github.com/eggjs/egg-errors/issues"},"homepage":"https://github.com/eggjs/egg-errors#readme","_id":"egg-errors@2.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.4.0","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"shasum":"f55b1a94bb7392876d5b22843cf57cc973a49513","size":14822,"noattachment":false,"key":"/egg-errors/-/egg-errors-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-errors/download/egg-errors-2.1.0.tgz"},"maintainers":[{"name":"akitasummer","email":""},{"name":"atian25","email":"atian25@qq.com"},{"name":"coolme200","email":""},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"eggjs-admin","email":""},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"gxkl","email":""},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"mansonchor","email":"113803644@qq.com"},{"name":"mansonchor.zzw","email":""},{"name":"popomore","email":""},{"name":"wanghx","email":"851094531@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-errors_2.1.0_1545831076666_0.06733052740900947"},"_hasShrinkwrap":false,"publish_time":1545831076789,"_cnpm_publish_time":1545831076789},"2.0.1":{"name":"egg-errors","version":"2.0.1","description":"[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down","scripts":{"test":"egg-bin test --typescript","cov":"egg-bin cov --typescript","tsc":"tsc -p tsconfig.json","ci":"npm run lint && npm run cov && npm run tsc","autod":"autod","prepublishOnly":"npm run tsc","lint":"tslint --project tsconfig.json"},"main":"lib/index.js","types":"lib/index.d.ts","dependencies":{},"devDependencies":{"@types/mocha":"^2.2.40","@types/node":"^7.0.12","autod":"^3.0.1","autod-egg":"^1.1.0","dedent":"^0.7.0","egg-bin":"^4.9.0","egg-ci":"^1.8.0","statuses":"^1.5.0","toidentifier":"^1.0.0","tslint":"^5.11.0","tslint-config-egg":"^1.0.0","typescript":"^3.2.2"},"engines":{"node":">=8.9.0"},"ci":{"version":"8, 10","license":true},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/egg-errors.git"},"eslintIgnore":["coverage"],"author":{"name":"popomore"},"license":"MIT","gitHead":"1697867973dfa10c4a7fcc078c583957262f175f","bugs":{"url":"https://github.com/eggjs/egg-errors/issues"},"homepage":"https://github.com/eggjs/egg-errors#readme","_id":"egg-errors@2.0.1","_npmVersion":"6.4.1","_nodeVersion":"8.4.0","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"shasum":"fe453507a20f527947f0b00e707bd9e7baf16f43","size":14273,"noattachment":false,"key":"/egg-errors/-/egg-errors-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-errors/download/egg-errors-2.0.1.tgz"},"maintainers":[{"name":"akitasummer","email":""},{"name":"atian25","email":"atian25@qq.com"},{"name":"coolme200","email":""},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"eggjs-admin","email":""},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"gxkl","email":""},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"mansonchor","email":"113803644@qq.com"},{"name":"mansonchor.zzw","email":""},{"name":"popomore","email":""},{"name":"wanghx","email":"851094531@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-errors_2.0.1_1545057899793_0.9380001800816762"},"_hasShrinkwrap":false,"publish_time":1545057899955,"_cnpm_publish_time":1545057899955},"2.0.0":{"name":"egg-errors","version":"2.0.0","description":"[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down","scripts":{"test":"egg-bin test --typescript","cov":"egg-bin cov --typescript","tsc":"tsc -p tsconfig.json","ci":"npm run lint && npm run cov && npm run tsc","autod":"autod","prepublishOnly":"npm run tsc","lint":"tslint --project tsconfig.json"},"main":"lib/index.js","types":"lib/index.d.ts","dependencies":{},"devDependencies":{"@types/mocha":"^2.2.40","@types/node":"^7.0.12","autod":"^3.0.1","autod-egg":"^1.1.0","dedent":"^0.7.0","egg-bin":"^4.9.0","egg-ci":"^1.8.0","statuses":"^1.5.0","toidentifier":"^1.0.0","tslint":"^5.11.0","tslint-config-egg":"^1.0.0","typescript":"^3.2.2"},"engines":{"node":">=8.9.0"},"ci":{"version":"8, 10","license":true},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/egg-errors.git"},"eslintIgnore":["coverage"],"author":{"name":"popomore"},"license":"MIT","gitHead":"2e82d62eb53b4f7e0b3ae0c9dce991a65dbf8f5f","bugs":{"url":"https://github.com/eggjs/egg-errors/issues"},"homepage":"https://github.com/eggjs/egg-errors#readme","_id":"egg-errors@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.4.0","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"shasum":"d138daea40c1e610e37adba017bd8f7cba483a5d","size":14223,"noattachment":false,"key":"/egg-errors/-/egg-errors-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-errors/download/egg-errors-2.0.0.tgz"},"maintainers":[{"name":"akitasummer","email":""},{"name":"atian25","email":"atian25@qq.com"},{"name":"coolme200","email":""},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"eggjs-admin","email":""},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"gxkl","email":""},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"mansonchor","email":"113803644@qq.com"},{"name":"mansonchor.zzw","email":""},{"name":"popomore","email":""},{"name":"wanghx","email":"851094531@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-errors_2.0.0_1544524339012_0.7638969442758154"},"_hasShrinkwrap":false,"publish_time":1544524339145,"_cnpm_publish_time":1544524339145},"1.0.1":{"name":"egg-errors","version":"1.0.1","description":"[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down","scripts":{"test":"egg-bin test --typescript","cov":"egg-bin cov --typescript","tsc":"tsc -p tsconfig.json","ci":"npm run lint && npm run cov && npm run tsc","autod":"autod","prepublish":"npm run tsc","lint":"tslint --project . -c tslint.json"},"main":"index.js","types":"index.d.ts","files":["*.js","*.d.ts","lib/**/*.js","lib/**/*.d.ts"],"dependencies":{},"devDependencies":{"@types/mocha":"^2.2.40","@types/node":"^7.0.12","autod":"^3.0.1","autod-egg":"^1.1.0","dedent":"^0.7.0","egg-bin":"^4.8.1","egg-ci":"^1.8.0","statuses":"^1.5.0","toidentifier":"^1.0.0","tslib":"^1.9.3","tslint":"^4.0.0","typescript":"^3.0.1"},"engines":{"node":">=8.9.0"},"ci":{"version":"8, 10","license":true},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/egg-errors.git"},"eslintIgnore":["coverage"],"author":{"name":"popomore"},"license":"MIT","gitHead":"f20f0049304ac5385cb2fa1a093f18e290042cc3","bugs":{"url":"https://github.com/eggjs/egg-errors/issues"},"homepage":"https://github.com/eggjs/egg-errors#readme","_id":"egg-errors@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"shasum":"e44b5611ec40d30e499e81469a64aca4eed74cc5","size":14184,"noattachment":false,"key":"/egg-errors/-/egg-errors-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-errors/download/egg-errors-1.0.1.tgz"},"maintainers":[{"name":"akitasummer","email":""},{"name":"atian25","email":"atian25@qq.com"},{"name":"coolme200","email":""},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"eggjs-admin","email":""},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"gxkl","email":""},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"mansonchor","email":"113803644@qq.com"},{"name":"mansonchor.zzw","email":""},{"name":"popomore","email":""},{"name":"wanghx","email":"851094531@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-errors_1.0.1_1534850485818_0.343116109317142"},"_hasShrinkwrap":false,"publish_time":1534850485923,"_cnpm_publish_time":1534850485923},"1.0.0":{"name":"egg-errors","version":"1.0.0","description":"[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down","scripts":{"test":"egg-bin test --typescript","cov":"egg-bin cov --typescript","tsc":"tsc -p tsconfig.json","ci":"npm run lint && npm run cov && npm run tsc","autod":"autod","lint":"tslint --project . -c tslint.json"},"main":"index.js","types":"index.d.ts","files":["*.js","*.d.ts","lib/**/*.js","lib/**/*.d.ts"],"dependencies":{},"devDependencies":{"@types/mocha":"^2.2.40","@types/node":"^7.0.12","autod":"^3.0.1","autod-egg":"^1.1.0","dedent":"^0.7.0","egg-bin":"^4.8.1","egg-ci":"^1.8.0","statuses":"^1.5.0","toidentifier":"^1.0.0","tslib":"^1.9.3","tslint":"^4.0.0","typescript":"^3.0.1"},"engines":{"node":">=8.9.0"},"ci":{"version":"8, 10","license":true},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/egg-errors.git"},"eslintIgnore":["coverage"],"author":{"name":"popomore"},"license":"MIT","gitHead":"10af490f03d8b012a96f9d660e8a154881da8223","bugs":{"url":"https://github.com/eggjs/egg-errors/issues"},"homepage":"https://github.com/eggjs/egg-errors#readme","_id":"egg-errors@1.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.4.0","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"shasum":"c6d42e016f400429bc135441ea90e137085878de","size":2934,"noattachment":false,"key":"/egg-errors/-/egg-errors-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-errors/download/egg-errors-1.0.0.tgz"},"maintainers":[{"name":"akitasummer","email":""},{"name":"atian25","email":"atian25@qq.com"},{"name":"coolme200","email":""},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"eggjs-admin","email":""},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"gxkl","email":""},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"mansonchor","email":"113803644@qq.com"},{"name":"mansonchor.zzw","email":""},{"name":"popomore","email":""},{"name":"wanghx","email":"851094531@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-errors_1.0.0_1534850257414_0.5252454675483347"},"_hasShrinkwrap":false,"publish_time":1534850257501,"_cnpm_publish_time":1534850257501}},"readme":"# egg-errors\n\n[![NPM version][npm-image]][npm-url]\n[![Node.js CI](https://github.com/eggjs/egg-errors/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/egg-errors/actions/workflows/nodejs.yml)\n[![Test coverage][codecov-image]][codecov-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/egg-errors.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/egg-errors\n[codecov-image]: https://codecov.io/gh/eggjs/egg-errors/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/eggjs/egg-errors\n[snyk-image]: https://snyk.io/test/npm/egg-errors/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/egg-errors\n[download-image]: https://img.shields.io/npm/dm/egg-errors.svg?style=flat-square\n[download-url]: https://npmjs.org/package/egg-errors\n\nErrors for [Egg.js](https://eggjs.org)\n\negg-errors provide two kinds of errors that is Error and Exception.\n\n- Exception is system error that egg will log an error and throw exception, but it will be catched by onerror plugin.\n- Error is business error that egg will transform it to response.\n\n## Install\n\n```bash\n$ npm i egg-errors --save\n```\n\n## Usage\n\nCreate an Error\n\n```js\nconst { EggError, EggException } = require('egg-errors');\nlet err = new EggError('egg error');\nconsole.log(EggError.getType(err)); // ERROR\n```\n\nCreate an Exception\n\n```js\nerr = new EggException('egg exception');\nconsole.log(EggException.getType(err)); // EXCEPTION\n```\n\nYou can import an error from an normal error object\n\n```js\nerr = new Error('normal error');\nconsole.log(EggError.getType(err)); // BUILTIN\nerr = EggError.from(err);\nconsole.log(EggError.getType(err)); // ERROR\n```\n\n### Customize Error\n\nError can be extendable.\n\n```js\nconst { EggBaseError } = require('egg-errors');\n\nclass CustomError extends EggBaseError {\n  constructor(message) {\n    super({ message, code: 'CUSTOM_CODE' });\n  }\n }\n```\n\nor using typescript you can customize ErrorOptions.\n\n```js\nimport { EggBaseError, ErrorOptions } from 'egg-errors';\n\nclass CustomErrorOptions extends ErrorOptions {\n  public data: object;\n}\nclass CustomError extends EggBaseError<CustomErrorOptions> {\n  public data: object;\n  protected options: CustomErrorOptions;\n\n  constructor(options?: CustomErrorOptions) {\n    super(options);\n    this.data = this.options.data;\n  }\n}\n```\n\nRecommend use message instead of options in user land that it can be easily understood by developer, see [http error](https://github.com/eggjs/egg-errors/blob/master/lib/http/400.ts).\n\n### HTTP Errors\n\nHTTP Errors is BUILTIN errors that transform 400 ~ 500 status code to error objects. HttpError extends EggBaseError providing two properties which is `status` and `headers`;\n\n```js\nconst { ForbiddenError } = require('egg-errors');\nconst err = new ForbiddenError('your request is forbidden');\nconsole.log(err.status); // 403\n```\n\nSupport short name too:\n\n```js\nconst { E403 } = require('egg-errors');\nconst err = new E403('your request is forbidden');\nconsole.log(err.status); // 403\n```\n\n### FrameworkBaseError\n\nFrameworkBaseError is for egg framework/plugin developer to throw framework error.it can format by FrameworkErrorFormater\n\nFrameworkBaseError extends EggBaseError providing three properties which is `module`、`serialNumber` and `errorContext`\n\nFrameworkBaseError could not be used directly, framework/plugin should extends like this\n\n```js\nconst { FrameworkBaseError } = require('egg-errors');\n\nclass EggMysqlError extends FrameworkBaseError {\n  // module should be implement\n  get module() {\n    return 'EGG_MYSQL';\n  }\n}\n\nconst err = new EggMysqlError('error message', '01', { traceId: 'xxx' });\nconsole.log(err.module); // EGG_MYSQL\nconsole.log(err.serialNumber); // 01\nconsole.log(err.code); // EGG_MYSQL_01\nconsole.log(err.errorContext); // { traceId: 'xxx' }\n```\n\n#### create frameworkError with formater\n\nuse the static method `.create(message: string, serialNumber: string | number, errorContext?: any)` to new a frameworkError and format it convenient\n\n```js\nconst { FrameworkBaseError } = require('egg-errors');\n\nclass EggMysqlError extends FrameworkBaseError {\n  // module should be implement\n  get module() {\n    return 'EGG_MYSQL';\n  }\n}\n\nconst err = EggMysqlError.create('error message', '01', { traceId: 'xxx' });\nconsole.log(err.message); \n// =>\nframework.EggMysqlError: error message [ https://eggjs.org/zh-cn/faq/EGG_MYSQL/01 ]\n```\n\n### FrameworkErrorFormater\n\nFrameworkErrorFormater will append a faq guide url in error message.this would be helpful when developer encountered a framework error\n\nthe faq guide url format: `${faqPrefix}/${err.module}/${err.serialNumber}`, `faqPrefix` is `https://eggjs.org/zh-cn/faq` by default. can be extendable or set `process.env.EGG_FRAMEWORK_ERR_FAQ_PERFIX` to override it.\n\n```js\nconst { FrameworkErrorFormater } = require('egg-errors');\n\nclass CustomErrorFormatter extends FrameworkErrorFormater {\n  static faqPrefix = 'http://www.custom.com/faq';\n}\n```\n\n#### .format(err)\n\nformat error to message, it will not effect origin error\n\n```js\nconst { FrameworkBaseError, FrameworkErrorFormater } = require('egg-errors');\n\nclass EggMysqlError extends FrameworkBaseError {\n  // module should be implement\n  get module() {\n    return 'EGG_MYSQL';\n  }\n}\n\nconst message = FrameworkErrorFormater.format(new EggMysqlError('error message', '01'));\nconsole.log(message); \n// => message format like this\nframework.EggMysqlError: error message [ https://eggjs.org/zh-cn/faq/EGG_MYSQL/01 ]\n...stack\n...\ncode: \"EGG_MYSQL_01\"\nserialNumber: \"01\"\nerrorContext:\npid: 66568\nhostname: xxx\n\n\n// extends\nclass CustomErrorFormatter extends FrameworkErrorFormater {\n  static faqPrefix = 'http://www.custom.com/faq';\n}\nconst message = CustomErrorFormatter.format(new EggMysqlError('error message', '01'));\nconsole.log(message); \n// =>\nframework.EggMysqlError: error message [ http://www.custom.com/faq/EGG_MYSQL/01 ]\n...\n```\n\n#### .formatError(err)\n\nappend faq guide url to err.message\n\n```js\nconst { FrameworkBaseError, FrameworkErrorFormater } = require('egg-errors');\n\nclass EggMysqlError extends FrameworkBaseError {\n  // module should be implement\n  get module() {\n    return 'EGG_MYSQL';\n  }\n}\n\nconst err = FrameworkErrorFormater.formatError(new EggMysqlError('error message', '01'));\nconsole.log(err.message); // error message [ https://eggjs.org/zh-cn/faq/EGG_MYSQL/01 ]\n```\n\n\n### Available Errors\n\n```\nBaseError\n|- EggBaseError\n|  |- EggError\n|  |- HttpError\n|  |  |- NotFoundError, alias to E404\n|  |  `- ...\n|  |- FrameworkBaseError\n|  `- CustomError\n`- EggBaseException\n   |- EggException\n   `- CustomException\n```\n\n## Questions & Suggestions\n\nPlease open an issue [here](https://github.com/eggjs/egg/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc).\n\n## License\n\n[MIT](LICENSE)\n<!-- GITCONTRIBUTOR_START -->\n\n## Contributors\n\n|[<img src=\"https://avatars.githubusercontent.com/u/360661?v=4\" width=\"100px;\"/><br/><sub><b>popomore</b></sub>](https://github.com/popomore)<br/>|[<img src=\"https://avatars.githubusercontent.com/u/2160731?v=4\" width=\"100px;\"/><br/><sub><b>mansonchor</b></sub>](https://github.com/mansonchor)<br/>|[<img src=\"https://avatars.githubusercontent.com/u/156269?v=4\" width=\"100px;\"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src=\"https://avatars.githubusercontent.com/u/12657964?v=4\" width=\"100px;\"/><br/><sub><b>beliefgp</b></sub>](https://github.com/beliefgp)<br/>|[<img src=\"https://avatars.githubusercontent.com/u/19644997?v=4\" width=\"100px;\"/><br/><sub><b>sm2017</b></sub>](https://github.com/sm2017)<br/>|\n| :---: | :---: | :---: | :---: | :---: |\n\n\nThis project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Tue Feb 22 2022 11:32:47 GMT+0800`.\n\n<!-- GITCONTRIBUTOR_END -->\n","_attachments":{},"homepage":"https://github.com/eggjs/egg-errors#readme","bugs":{"url":"https://github.com/eggjs/egg/issues"},"license":"MIT"}