{"name":"@semantic-release/error","version":"1.0.0","description":"errors with more than just a message","author":{"name":"Stephan Bönnemann","email":"stephan@boennemann.me","url":"http://boennemann.me"},"bugs":{"url":"https://github.com/semantic-release/error/issues"},"config":{"nyc":{"exclude":[".test","node_modules"]}},"devDependencies":{"babel":"^5.5.8","coveralls":"^2.11.2","mkdirp":"^0.5.1","nyc":"^3.0.0","rimraf":"^2.4.0","standard":"^4.2.1","tap":"^1.2.0"},"homepage":"https://github.com/semantic-release/error#readme","keywords":["semantic-release","error"],"license":"MIT","main":"dist/index.js","repository":{"type":"git","url":"git+https://github.com/semantic-release/error.git"},"scripts":{"build":"rimraf dist && mkdirp dist && babel src --out-dir dist","build:tests":"rimraf .test && mkdirp .test && babel test --out-dir .test","coverage":"nyc report","coverage:upload":"npm run coverage -- --reporter=lcovonly && coveralls < coverage/lcov.info","pretest:suite":"npm run build && npm run build:tests","test":"npm run test:style && npm run test:suite","test:style":"standard","test:suite":"nyc tap --no-cov .test/{scenarios,specs}/*.js"},"gitHead":"7c35a3ecb240ffdd8893b6ea142b9838a945d1b4","_id":"@semantic-release/error@1.0.0","_shasum":"bb8f8eeedd5c7f8c46f96b37ef39e1b8c376c1cc","_from":".","_npmVersion":"2.13.0","_nodeVersion":"2.3.0","_npmUser":{"name":"semantic-release","email":"semantic-release@boennemann.me"},"dist":{"shasum":"bb8f8eeedd5c7f8c46f96b37ef39e1b8c376c1cc","tarball":"http://registry-npm.ywwl.com/@semantic-release/error/download/@semantic-release/error-1.0.0.tgz","integrity":"sha512-lwMf3GZqrHiUw/MSO/HNYVdkqXt74FZVESDfzs4dalLdOOBsksOy6F6Mttq4yHTtNLWGh+pXU8pixh86i3PuJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICV4fjtgDu1xQmOnonywBc1fTPq2MZrFbl1lSdNHX/ChAiEAt13bF/2SJCKHNB1VfrbleH1a0ctXikHDODGi2cFrKRs="}],"size":1752,"noattachment":false,"key":"/@semantic-release/error/-/@semantic-release/error-1.0.0.tgz"},"maintainers":[{"name":"semantic-release","email":"semantic-release@boennemann.me"}],"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":1436866052674,"_cnpm_publish_time":1436866052674,"dist-tags":{"beta":"3.0.0-beta.1","latest":"4.0.0"}}