{"name":"@semantic-release/error","description":"errors with more than just a message","version":"3.0.0-beta.1","author":{"name":"Stephan Bönnemann","email":"stephan@boennemann.me","url":"http://boennemann.me"},"ava":{"files":["test/**/*.test.js"]},"bugs":{"url":"https://github.com/semantic-release/error/issues"},"devDependencies":{"ava":"3.15.0","codecov":"3.8.1","nyc":"15.1.0","xo":"0.38.2"},"engines":{"node":">=14.17"},"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,"trailingComma":"es5"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/semantic-release/error.git"},"scripts":{"codecov":"codecov -f coverage/coverage-final.json","lint":"xo","pretest":"npm run lint","semantic-release":"semantic-release","test":"nyc ava -v","test:ci":"nyc ava -v"},"xo":{"prettier":true,"space":true,"rules":{"unicorn/string-content":"off"}},"renovate":{"extends":["github>semantic-release/.github"]},"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\nconst SemanticReleaseError = require(\"@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","readmeFilename":"README.md","gitHead":"e94458017064d92157b261126982f0d98869e501","_id":"@semantic-release/error@3.0.0-beta.1","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-ID5XJMSNFYw5EucL+Q2QBLT852qW6V+t1o5kY/Y+pv3vqw8It7Jixvao9a3lrPZhniPlvlWB3Jd7jN1lBkPmzw==","shasum":"18f646429562cb1b4306482be7d00a9f7c37cc49","tarball":"http://registry-npm.ywwl.com/@semantic-release/error/download/@semantic-release/error-3.0.0-beta.1.tgz","fileCount":4,"unpackedSize":4680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMlOgCRA9TVsSAnZWagAA7x0P/RfYpkDk3F1Z5KnBZGZJ\nTXVnNdJPDFmYK7rL4p08FhzvVcXfYMyB43cx4anoEgoPkXvKnzGrZQbm4/js\n+AKlISyMkUfZbq0dVao01Uh2ImzlcD2eyjU3IJ7Y55WboLwFu2y7A8Ncw43z\nG3Oc82AuPd0rxB9ZiYZyJEDfTQ+uwQDecSkaDCIJoQRGZDHCNLuBfrVa/M6A\nv745frA3zqKSiqfc4ZJ7eJ/EidRAwJEg0upy3U4Gyt1TB8bR5OWIbrVd4Ic5\nA4PAepNMLYeGQ8Veh2mKdAXANM/n1Yxjot9FBlkEUg7AR/SyPP79B/xGTkps\nZ+Zt/s4GLN+yN8Wyl6AM9f2InD/OVp/as+3OGVgghYSkdGc9FXwgRG9cMjwo\ngTyGE2MkbDeX/kIA0Zt1PRoojIrVEGY0SYXoVknQ8P6QN4at7acWAo1hQ9DD\nF4y9VgxIvdOB/nWVvSO6+a1SnF8Dmh2fE9WpD1N9lYmUQevH7PZUQcHFvZj6\nAmzFtEOb1d8MA7DowjYjAnOTkOrCAsf+wgsMw63Pce3EtbB2L0FC3IUYvu4Q\nHKPvYutTDrhB/ii/AbukkXtpK0R4laJT9Yu5owxYaaY72gSIXwDE/FdHzhOa\npExNgtFKeRxbSIWHPN/tQnINK9IKtXPZJ2kU8zuaNR6P7SJwq4U35Sy87W8d\nRCL1\r\n=nWNI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNQBDKqVYRYgH1FSKrxflPdTZAfsVi8wzK95nTfm43tgIhAPnToXHMRugGhJK1AN+UpNo+o2XWU6iPY9p5i4n0J3Y6"}],"size":2084,"noattachment":false,"key":"/@semantic-release/error/-/@semantic-release/error-3.0.0-beta.1.tgz"},"_npmUser":{"name":"semantic-release-bot","email":"semantic-release@martynus.net"},"directories":{},"maintainers":[{"name":"pvdlg","email":"pierre.denis.vanduynslager@gmail.com"},{"name":"semantic-release-bot","email":"semantic-release@martynus.net"},{"name":"boennemann","email":"me@sbw.one"},{"name":"christophwitzko","email":"npm@christophwitzko.com"},{"name":"gr2m","email":"gregor@martynus.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/error_3.0.0-beta.1_1630688160173_0.3314140619048076"},"_hasShrinkwrap":false,"publish_time":1630688160302,"_cnpm_publish_time":1630688160302,"dist-tags":{"beta":"3.0.0-beta.1","latest":"4.0.0"}}