{"name":"@semantic-release/error","description":"errors with more than just a message","version":"2.0.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.22.0","codecov":"^2.3.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.7.0","eslint-config-prettier":"^2.5.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.1.1","eslint-plugin-prettier":"^2.2.0","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","nyc":"^11.2.1","prettier":"^1.7.0","rimraf":"^2.6.2","semantic-release":"^8.0.0"},"eslintConfig":{"extends":["standard","prettier"],"plugins":["prettier"],"rules":{"prettier/prettier":2}},"files":["index.js"],"homepage":"https://github.com/semantic-release/error#readme","keywords":["error","semantic-release"],"license":"MIT","main":"index.js","nyc":{"lines":100,"statements":100,"functions":100,"branches":100,"include":["index.js"],"reporter":["lcov","text"],"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":{"clean":"rimraf coverage && rimraf .nyc_output","cm":"git-cz","codecov":"codecov","coverage":"nyc check-coverage","lint":"eslint .","pretest":"npm run clean && npm run lint","semantic-release":"semantic-release pre && npm publish && semantic-release post","test":"nyc ava -v"},"gitHead":"f10d76ee37483619ab4cc8515631496ba789e939","_id":"@semantic-release/error@2.0.0","_npmVersion":"5.4.2","_nodeVersion":"8.4.0","_npmUser":{"name":"gr2m","email":"gregor@martynus.net"},"dist":{"integrity":"sha512-756QdQyJGh4126IAt4CCJlmf+5qjkfzUv//RxsJHtJh0M+oy6WstA2IA5iqQeoXpc1GfgertkkMF39HJ/9VPpA==","shasum":"f156ecd509f5288c48bc7425a8abe22f975d1f8b","tarball":"http://registry-npm.ywwl.com/@semantic-release/error/download/@semantic-release/error-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC05K9e8gCWkktTt1dGpkvRhz3LvRkjirHtqNIuyomFDwIhAIKpLa/w0z6nOEx8m5IFu8l7UhDMTeGIJDZMo5Rsvz7t"}],"size":2166,"noattachment":false,"key":"/@semantic-release/error/-/@semantic-release/error-2.0.0.tgz"},"maintainers":[{"email":"gregor@martynus.net","name":"gr2m"},{"email":"npm@christophwitzko.com","name":"christophwitzko"},{"email":"stephan@boennemann.me","name":"boennemann"},{"email":"semantic-release@boennemann.me","name":"semantic-release-bot"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/error-2.0.0.tgz_1506356852922_0.6268320269882679"},"directories":{},"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":1506356853065,"_cnpm_publish_time":1506356853065,"dist-tags":{"beta":"3.0.0-beta.1","latest":"4.0.0"}}