{"name":"@semantic-release/error","description":"errors with more than just a message","version":"2.2.0","author":{"name":"Stephan Bönnemann","email":"stephan@boennemann.me","url":"http://boennemann.me"},"bugs":{"url":"https://github.com/semantic-release/error/issues"},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"devDependencies":{"ava":"^0.25.0","codecov":"^3.0.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint-config-prettier":"^2.5.0","eslint-plugin-prettier":"^2.2.0","nyc":"^11.2.1","prettier":"~1.10.0","semantic-release":"^12.2.2","xo":"^0.18.2"},"files":["index.js"],"homepage":"https://github.com/semantic-release/error#readme","keywords":["error","semantic-release"],"license":"MIT","main":"index.js","nyc":{"include":["index.js"],"reporter":["json","text","html"],"all":true},"prettier":{"printWidth":120,"singleQuote":true,"bracketSpacing":false,"trailingComma":"es5"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/semantic-release/error.git"},"scripts":{"cm":"git-cz","codecov":"codecov -f coverage/coverage-final.json","lint":"xo","pretest":"npm run lint","semantic-release":"semantic-release","test":"nyc ava -v"},"xo":{"extends":["prettier"],"plugins":["prettier"],"rules":{"prettier/prettier":2}},"gitHead":"30631f0fc13d7ee6dc9e63cd119ce5d87db0cbd4","_id":"@semantic-release/error@2.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"semantic-release-bot","email":"semantic-release@boennemann.me"},"dist":{"integrity":"sha512-9Tj/qn+y2j+sjCI3Jd+qseGtHjOAeg7dU2/lVcqIQ9TV3QDaDXDYXcoOHU+7o2Hwh8L8ymL4gfuO7KxDs3q2zg==","shasum":"ee9d5a09c9969eade1ec864776aeda5c5cddbbf0","tarball":"http://registry-npm.ywwl.com/@semantic-release/error/download/@semantic-release/error-2.2.0.tgz","fileCount":4,"unpackedSize":5038,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2RVk8glHAxzOrOpWrXcBS9aqABYnFvjJteU4gM/ii5AiEAkz/D0VhZJ68guYZehjSa2ime3qnTp2iYl9tWQL5Apho="}],"size":2161,"noattachment":false,"key":"/@semantic-release/error/-/@semantic-release/error-2.2.0.tgz"},"maintainers":[{"email":"stephan@boennemann.me","name":"boennemann"},{"email":"npm@christophwitzko.com","name":"christophwitzko"},{"email":"gregor@martynus.net","name":"gr2m"},{"email":"semantic-release@boennemann.me","name":"semantic-release-bot"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/error_2.2.0_1518243967714_0.6073889486531177"},"_hasShrinkwrap":false,"readme":"# @semantic-release/error\n\nError type used by all [semantic-release](https://github.com/semantic-release/semantic-release) packages.\n\n[![Build Status](https://github.com/semantic-release/error/workflows/Test/badge.svg)](https://github.com/semantic-release/error/actions?query=workflow%3ATest+branch%3Amaster)\n\nErrors of type `SemanticReleaseError` or an inherited type will be considered by [semantic-release](https://github.com/semantic-release/semantic-release) as an expected exception case (no release to be done, running on a PR etc..). That indicate to the `semantic-release` process to stop and exit with the `0` success code.\n\nAny other type of error will be considered by [semantic-release](https://github.com/semantic-release/semantic-release) as an unexpected error (i/o issue, code problem etc...). That indicate to the `semantic-release` process to stop, log the error and exit with the `1` failure code.\n\n## Usage\n\n```js\nimport SemanticReleaseError from \"@semantic-release/error\";\n\n// Default\nthrow new SemanticReleaseError();\n\n// With error message\nthrow new SemanticReleaseError(\"An error happened\");\n\n// With error message and error code\nthrow new SemanticReleaseError(\"An error happened\", \"ECODE\");\n\n// With error message, error code and details\nthrow new SemanticReleaseError(\"An error happened\", \"ECODE\", \"Here is some suggestions to solve this error.\");\n\n// With inheritance\nclass InheritedError extends SemanticReleaseError {\n  constructor(message, code, newProperty, details) {\n    super(message);\n    Error.captureStackTrace(this, this.constructor);\n    this.name = this.constructor.name;\n    this.code = code;\n    this.details = details;\n    this.newProperty = \"newProperty\";\n  }\n}\n\nthrow new InheritedError(\"An error happened\", \"ECODE\", \"Here is some suggestions to solve this error.\");\n```\n","publish_time":1518243968441,"_cnpm_publish_time":1518243968441,"dist-tags":{"beta":"3.0.0-beta.1","latest":"4.0.0"}}