{"_id":"enhanced-exception","_rev":"5-49078801b473bb59e6d84a5c5580b13c","name":"enhanced-exception","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"enhanced-exception","version":"1.0.0","keywords":["next.js","next","react","plugins","compose"],"author":{"name":"IdkMan2"},"license":"MIT","_id":"enhanced-exception@1.0.0","maintainers":[{"name":"idkman","email":"nowyarek@gmail.com"}],"homepage":"https://github.com/IdkMan2/enhanced-exception/lib#readme","bugs":{"url":"https://github.com/IdkMan2/enhanced-exception/issues"},"dist":{"shasum":"7b43641a11e87c70099424177906ea233895c9fe","tarball":"https://registry.npmjs.org/enhanced-exception/-/enhanced-exception-1.0.0.tgz","fileCount":19,"integrity":"sha512-tE/6dbvW8xLQFXc/SLqNEl0nXdKSIg2/JCjrK8qxH7LrD5xVkrQ9TDroaVuXeKxHWqvroEGB0XMLjuscDLKPbg==","signatures":[{"sig":"MEUCIDaWfJi3f2cgZTnB77KHFVBAvTnoybb19X73ajEnMgd+AiEAo6o32TzUcEXuSABVEmSD/TAITEFBJF3ztLNCmb9i/dA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12349,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkILxgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpdqg/+IPmcOwbh1YeuYlbjlXW7CU0zfQPmTclKMhSe7ocFlry8oUDj\r\nbdgShtLCKFaaXp37m3VqR9qOn7DCFAMFHGMkRoFyiUL9geQ1i2s/hbprDJpK\r\nRf3yIvmnEgTxeRyWXB9Zlr8bxnkjZ4l300nfdH69FAeWdyXLKIiU50DdMI+L\r\nkXyd3gUu+ixnXAu2TwNbmJen/skCB5GWifJdsIQ6nwhT7Qw/dYzpJjx20jjQ\r\nFD/XkbFr7ySYv8AjHDrNBrJ7Y4Fw6p0H0cV5iYx6jNV5wU64zefQFIC8thj7\r\nkBHMXE6wiiV/On8xEQ2yzHc6pqqVBd85iTI42Y4llZZG/I7TibJERvLKxoNr\r\nmYXN+APY1YnGuqqcx1bABKxvPosTdLR2MnWLR9Lv5y0wFNTakhmc4to50l5m\r\n2sv/BQ1bL93bb8/+B63Kr/IPY6DzlRb0ZvMwUYfdfdTXVnnmr0q0xhoqi+UT\r\nxnPK5YoBoJ4p/PT4kj/n3VsVaYWo698wXuSU3gIKIVk61H4NUfrulRoXKXf/\r\nJuzFd6drcOhGgsVZ4lt/3CWtTr5LaXlwX8FHcMjOtbFChvKgQxrTBsjy6ON3\r\nIjSpzqPMjiSGp9WzFiuRlTsuhpkISoGg1DD7AMN9UAvWJNK9BdX/n+fTPDTm\r\nlRQSTVGB/dXzZmtylHo3hDtoa7uxhLIQMW8=\r\n=2EG2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/cjs/Exception.js","type":"module","types":"./dist/cjs/Exception.d.ts","module":"./dist/esm/Exception.js","exports":{".":{"import":{"types":"./dist/esm/Exception.d.ts","default":"./dist/esm/Exception.js"},"require":{"types":"./dist/cjs/Exception.d.ts","default":"./dist/cjs/Exception.js"}}},"scripts":{"lint":"yarn run eslint --config .eslintrc.cjs --ignore-path .eslintignore --fix \"{src,test}/**/*.ts\"","test":"jest","build":"rollup -c rollup/rollup.config.js","format":"yarn run prettier --config .prettierrc.cjs --ignore-path .prettierignore --loglevel warn --write \"{src,test}/**/*.ts\"","ts-check":"tsc --project tsconfig.json --noEmit","clear-leavings":"rimraf *.tsbuildinfo *.eslintcache yarn-debug.log* yarn-error.log*"},"_npmUser":{"name":"idkman","email":"nowyarek@gmail.com"},"repository":{"url":"https://github.com/IdkMan2/enhanced-exception.git","type":"git"},"description":"- [Quick showcase](#quick-showcase) - [Installation](#installation) - [API](#api) - [Custom exceptions](#custom-exceptions)","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2018-present Cyril Wanner\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.36.0","rimraf":"^4.4.1","rollup":"^3.20.2","ts-jest":"^29.0.5","prettier":"^2.8.7","typescript":"^5.0.2","@types/jest":"^29.5.0","ts-jest-resolver":"^2.0.1","rollup-plugin-delete":"^2.0.0","eslint-config-prettier":"^8.8.0","@rollup/plugin-commonjs":"^24.0.1","@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/parser":"^5.56.0","@rollup/plugin-node-resolve":"^15.0.1","@typescript-eslint/eslint-plugin":"^5.56.0"},"_npmOperationalInternal":{"tmp":"tmp/enhanced-exception_1.0.0_1679866976787_0.5378564154907381","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"enhanced-exception","version":"1.0.1","keywords":["next.js","next","react","plugins","compose"],"author":{"name":"IdkMan2"},"license":"MIT","_id":"enhanced-exception@1.0.1","maintainers":[{"name":"idkman","email":"nowyarek@gmail.com"}],"homepage":"https://github.com/IdkMan2/enhanced-exception/lib#readme","bugs":{"url":"https://github.com/IdkMan2/enhanced-exception/issues"},"dist":{"shasum":"0bce38e3c214f33c14f8453b134b67fc49a2f241","tarball":"https://registry.npmjs.org/enhanced-exception/-/enhanced-exception-1.0.1.tgz","fileCount":17,"integrity":"sha512-jl4jRtWLA5KJ1xVBl3QA3vLWmGYQon1ydwfu1LEsQYvIwvQP1lAaQB0i8crk0BsqpZd16U8H/dtu6GAQ1iY7Bg==","signatures":[{"sig":"MEYCIQDV/im9JczuHH326fNASuGItB8AjIV0NhKz9FOMNnc1sgIhAIA167CoqE5+dOL6Metun2EyFdKYbvLI84L1xPk8ykNY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkITxBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDCA//RsvcEMM0Y+k8H2OZVvewflutIac625Ssm+6X8sXIABJlv4dR\r\nJm6QefoR+lsWt83GeEbvKiQwnHRjmMgEnSDDkP9x3FKOnsiRVMMmgmIcT79H\r\noj0LLtW0Oii5UnITL0wngs4B+w+8Z9/VWte9w55357zIDVEfsqRouD7cykdw\r\nlZr3jA5MlqSqUMmAiAxAFuLVQXfP3JBd/9KBCBvcrWys4N5Ufi4Y+4HVF1G7\r\niXdwrgl0mVRyLKWaCKG0uAIYhl0Bana/dt8aeG1EKGsOiU60vdOTmiF0p06t\r\nrVNdyMnJPH0j8prV+XbabBtj6D4dYcwtrhliCiK8QcvH54dFvrmhBXr0l0PW\r\nQ0ltscJF5GmiPUnUkQUHJs6PBaDxk+OJu1mDniFXnjRlCzmokHvYd1mjaAz4\r\nDYa2CihJ7hLoRu3QIiZ6wdOs5b20MDgZjqgko5udzVXIo2PzLcLpoFrgiCyX\r\nVsLSUrWIrXXvBAWeeuiSQFX5P8dNPO8xLirH+XfBj32JhLuOHezEN6gGsb9X\r\nO9Faihvyqfrj51MDxvRUP2LqRVi17CCUi0Ndgfq2QQ7r/e8Cbp2U3IRxcuNP\r\nrxjYegxmMjwPq1dciTuuxwcEhO38u4llYbAEoDmriLzdN/fqICqznq+aUp+x\r\n1SwTlRim4UUnaZfnRoupxJfhtEEX1TgxnZo=\r\n=Ru/E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/cjs/Exception.js","type":"module","types":"./dist/cjs/Exception.d.ts","module":"./dist/esm/Exception.js","exports":{".":{"import":{"types":"./dist/esm/Exception.d.ts","default":"./dist/esm/Exception.js"},"require":{"types":"./dist/cjs/Exception.d.ts","default":"./dist/cjs/Exception.js"}}},"scripts":{"lint":"yarn run eslint --config .eslintrc.cjs --ignore-path .eslintignore --fix \"{src,test}/**/*.ts\"","test":"jest","build":"rollup -c rollup/rollup.config.js","format":"yarn run prettier --config .prettierrc.cjs --ignore-path .prettierignore --loglevel warn --write \"{src,test}/**/*.ts\"","ts-check":"tsc --project tsconfig.json --noEmit","clear-leavings":"rimraf *.tsbuildinfo *.eslintcache yarn-debug.log* yarn-error.log*"},"_npmUser":{"name":"idkman","email":"nowyarek@gmail.com"},"repository":{"url":"https://github.com/IdkMan2/enhanced-exception.git","type":"git"},"description":"Special \"Exception\" class to significantly improve your stack traces.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2018-present Cyril Wanner\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"rollup-plugin-generate-package-json":"^3.2.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.36.0","rimraf":"^4.4.1","rollup":"^3.20.2","ts-jest":"^29.0.5","prettier":"^2.8.7","typescript":"^5.0.2","@types/jest":"^29.5.0","ts-jest-resolver":"^2.0.1","rollup-plugin-delete":"^2.0.0","eslint-config-prettier":"^8.8.0","@rollup/plugin-commonjs":"^24.0.1","@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/parser":"^5.56.0","@rollup/plugin-node-resolve":"^15.0.1","@typescript-eslint/eslint-plugin":"^5.56.0","@types/rollup-plugin-generate-package-json":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/enhanced-exception_1.0.1_1679899712874_0.2639804081410686","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"enhanced-exception","version":"1.0.2","keywords":["next.js","next","react","plugins","compose"],"author":{"name":"IdkMan2"},"license":"MIT","_id":"enhanced-exception@1.0.2","maintainers":[{"name":"idkman","email":"nowyarek+legacynpm@gmail.com"},{"name":"arklanq","email":"nowyarek@gmail.com"}],"homepage":"https://github.com/IdkMan2/enhanced-exception/lib#readme","bugs":{"url":"https://github.com/IdkMan2/enhanced-exception/issues"},"dist":{"shasum":"21897e9251bec7be402be6378ff37c4c8f64be58","tarball":"https://registry.npmjs.org/enhanced-exception/-/enhanced-exception-1.0.2.tgz","fileCount":13,"integrity":"sha512-wxcuNOKPZ+THvc/lByuenDj1YT74Eh0DKC86h/HEYOv++dj65BgwqDp//K062kUpIlYjBpqT8ovq5OR8tukYPQ==","signatures":[{"sig":"MEMCIGcpJ2jTfGEubg8aQog/2o1CRmCGMauVEPvhgPbQVtNqAh9J5LMEIuPZEMAeqQo6Oh7c1zCjzNjhJUv+iJ4WRKUR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12535},"main":"./dist/cjs/Exception.js","type":"module","types":"./dist/cjs/Exception.d.ts","module":"./dist/esm/Exception.js","exports":{".":{"import":{"types":"./dist/esm/Exception.d.ts","default":"./dist/esm/Exception.js"},"require":{"types":"./dist/cjs/Exception.d.ts","default":"./dist/cjs/Exception.js"}}},"gitHead":"9c9301a5f9b51e8dd06c35e63690b3d2c292a55b","scripts":{"build":"rollup -c .config/rollup/config.js","lint-code":"eslint \"{src,test}/**/*.ts\" --cache-location node_modules/.cache/eslint/.eslint-cache --fix","test-code":"jest --config .config/jest/config.js","check-code":"tsc --project tsconfig.json --noEmit","clear-dist":"rimraf dist","clear-cache":"rimraf node_modules/.cache","format-code":"prettier --log-level warn --write \"{src,test}/**/*.ts\"","check-updates":"ncu --configFilePath .config/ncu --configFileName ncu.config.cjs","force-updates":"ncu --configFilePath .config/ncu --configFileName ncu.config.cjs -u","build-production":"yarn build --environment NODE_ENV:production","prebuild-production":"yarn clear-cache && yarn check-code && yarn test-code && yarn lint-code && yarn format-code"},"_npmUser":{"name":"arklanq","email":"nowyarek@gmail.com"},"repository":{"url":"git+https://github.com/IdkMan2/enhanced-exception.git","type":"git"},"_npmVersion":"9.8.1","description":"Special \"Exception\" class to significantly improve your stack traces.","directories":{},"_nodeVersion":"18.17.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tslib":"^2.6.2","eslint":"^8.52.0","rimraf":"^5.0.5","rollup":"^4.1.4","ts-jest":"^29.1.1","prettier":"^3.0.3","typescript":"^5.2.2","@types/jest":"^29.5.6","ts-jest-resolver":"^2.0.1","rollup-plugin-delete":"^2.0.0","eslint-config-prettier":"^9.0.0","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-typescript":"^11.1.5","@typescript-eslint/parser":"^6.9.0","@rollup/plugin-node-resolve":"^15.2.3","@typescript-eslint/eslint-plugin":"^6.9.0","rollup-plugin-generate-package-json":"^3.2.0","@types/rollup-plugin-generate-package-json":"^3.2.6"},"_npmOperationalInternal":{"tmp":"tmp/enhanced-exception_1.0.2_1698411792142_0.11554032609610254","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"enhanced-exception","description":"Special \"Exception\" class to significantly improve your stack traces.","author":{"name":"IdkMan2"},"version":"1.0.3","license":"MIT","keywords":["next.js","next","react","plugins","compose"],"repository":{"type":"git","url":"git+https://github.com/IdkMan2/enhanced-exception.git"},"bugs":{"url":"https://github.com/IdkMan2/enhanced-exception/issues"},"homepage":"https://github.com/IdkMan2/enhanced-exception/lib#readme","scripts":{"build":"rollup -c .config/rollup/config.js","prebuild-production":"npm run clear-cache && npm run check-code && npm run test-code && npm run lint-code && npm run format-code","build-production":"NODE_ENV:production npm run build","format-code":"prettier --log-level warn --write \"{src,test}/**/*.ts\"","lint-code":"eslint \"{src,test}/**/*.ts\" --cache-location node_modules/.cache/eslint/.eslint-cache --fix","check-code":"tsc --project tsconfig.json --noEmit","test-code":"jest --config .config/jest/config.js","check-updates":"ncu --configFilePath .config/ncu --configFileName ncu.config.cjs","force-updates":"ncu --configFilePath .config/ncu --configFileName ncu.config.cjs -u","clear-dist":"rimraf dist","clear-cache":"rimraf node_modules/.cache"},"type":"module","main":"./dist/cjs/Exception.js","module":"./dist/esm/Exception.js","types":"./dist/cjs/Exception.d.ts","exports":{".":{"require":{"types":"./dist/cjs/Exception.d.ts","default":"./dist/cjs/Exception.js"},"import":{"types":"./dist/esm/Exception.d.ts","default":"./dist/esm/Exception.js"}}},"devDependencies":{"@eslint/js":"^9.33.0","@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-node-resolve":"^16.0.1","@rollup/plugin-typescript":"^12.1.4","@types/jest":"^30.0.0","@types/rollup-plugin-generate-package-json":"^3.2.9","eslint":"^9.33.0","eslint-config-prettier":"^10.1.8","jest":"^30.0.5","npm-check-updates":"^18.0.2","prettier":"^3.6.2","rimraf":"^6.0.1","rollup":"^4.46.2","rollup-plugin-delete":"^3.0.1","rollup-plugin-generate-package-json":"^3.2.0","ts-jest":"^29.4.1","ts-jest-resolver":"^2.0.1","tslib":"^2.8.1","typescript":"^5.9.2","typescript-eslint":"^8.39.1"},"_id":"enhanced-exception@1.0.3","gitHead":"db54daea78186a18b2f5f44b0124c9e8c31f07e6","_nodeVersion":"22.15.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-A44Iwwlu7rHbzZGZDtSltLmqrn+pgiLnG9629v/sju8Cxus1FBTLCsZYJkhOhScI6tcXf5K9HTrW4jPuAQAe0g==","shasum":"9d8f609cf88e933b29a1d24ee5d1d74a59139d50","tarball":"https://registry.npmjs.org/enhanced-exception/-/enhanced-exception-1.0.3.tgz","fileCount":13,"unpackedSize":12507,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGC4aCTLmHwbQytPlQPYu7eHxFT+7A2k1KkIDUytTaCjAiEAzH8UDGxmpxz2LMsH1QANegkoUJg2BDPl1J5CcBPH1AU="}]},"_npmUser":{"name":"arklanq","email":"nowyarek@gmail.com"},"directories":{},"maintainers":[{"name":"idkman","email":"nowyarek+legacynpm@gmail.com"},{"name":"arklanq","email":"nowyarek@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/enhanced-exception_1.0.3_1755443818227_0.5464709656543969"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-26T21:42:56.786Z","modified":"2025-08-17T15:16:58.599Z","1.0.0":"2023-03-26T21:42:56.958Z","1.0.1":"2023-03-27T06:48:33.034Z","1.0.2":"2023-10-27T13:03:12.388Z","1.0.3":"2025-08-17T15:16:58.418Z"},"bugs":{"url":"https://github.com/IdkMan2/enhanced-exception/issues"},"author":{"name":"IdkMan2"},"license":"MIT","homepage":"https://github.com/IdkMan2/enhanced-exception/lib#readme","keywords":["next.js","next","react","plugins","compose"],"repository":{"type":"git","url":"git+https://github.com/IdkMan2/enhanced-exception.git"},"description":"Special \"Exception\" class to significantly improve your stack traces.","maintainers":[{"name":"idkman","email":"nowyarek+legacynpm@gmail.com"},{"name":"arklanq","email":"nowyarek@gmail.com"}],"readme":"Have you come recently from `Java` or `C#` world into JavaScript and you start wondering how the hell we are living here\nwith the basic `Error` constructor? Yea, our stack traces aren't well descriptive, BUT here it is - `Exception` class\njust for you! Dive deep into the [Quick showcase](#quick-showcase) and see how this little lib can significantly improve\nyour stack traces today.\n\n> **Tip of the day** - If you are coding in TypeScript, remember\n> to [output source maps](https://www.typescriptlang.org/tsconfig#sourceMap) and\n> also [enable them in Node](https://nodejs.org/dist/latest-v12.x/docs/api/cli.html#cli_enable_source_maps).\n\n### Table of contents\n\n- [Quick showcase](#quick-showcase)\n- [Installation](#installation)\n- [API](#api)\n- [Custom exceptions](#custom-exceptions)\n\n### Quick showcase\n\nFor those who don't like to read a lot.\n\n**Code**\n\n```typescript\nasync function accessFileSystemFile() {\n  // some neat code here...\n  throw new Error('I/O Error');\n}\n\nasync function readLatestLog() {\n  try {\n    // some neat code here...\n    return await accessFileSystemFile();\n  } catch(e: unknown) {\n    throw new Exception('Unable to read log file.', e);\n  }\n}\n\nasync function bootstrap() {\n  try {\n    await readLatestLog();\n  } catch (e: unknown) {\n    throw new Exception('Failed to do some dangerous stuff.', e);\n  }\n}\n\nvoid bootstrap();\n```\n\n**Stack trace**\n\n```log\nException: Failed to do some dangerous stuff.\n    at file:///path/to/project/src/real-world-example.js:26:19\n    at Generator.throw (<anonymous>)\n    at rejected (/path/to/project/node_modules/tslib/tslib.js:113:69)\nCaused by: Exception: Unable to read log file.\n    at file:///path/to/project/src/real-world-example.js:16:19\n    at Generator.throw (<anonymous>)\n    at rejected (/path/to/project/node_modules/tslib/tslib.js:113:69)\nCaused by: Error: I/O Error\n    at file:///path/to/project/src/real-world-example.js:6:15\n    at Generator.next (<anonymous>)\n    at /path/to/project/node_modules/tslib/tslib.js:115:75\n    at new Promise (<anonymous>)\n    at __awaiter (/path/to/project/node_modules/tslib/tslib.js:111:16)\n    at accessFileSystemFile (file:///path/to/project/src/real-world-example.js:4:12)\n    at file:///path/to/project/src/real-world-example.js:13:26\n    at Generator.next (<anonymous>)\n    at /path/to/project/node_modules/tslib/tslib.js:115:75\n    at new Promise (<anonymous>)\n```\n\n### Installation\n\n```shell\nnpm install --save enhanced-exception\n```\n\nor\n\n```shell\nyarn add enhanced-exception\n```\n\n### API\n\n##### `Exception` class\n\n| element     | signature                              | comment                                                      |\n|-------------|----------------------------------------|--------------------------------------------------------------|\n| constructor | (message?: string, previous?: unknown) | Creates new `Exception` class object.                        |\n| .message    | string                                 | Exception message, the same as in classic `Error` object.    |\n| .name       | string                                 | Exception class name, the same as in classic `Error` object. |\n| .previous   | unknown                                | Previous error, provided via constructor.                    |\n\n\n### Custom exceptions\n\nThanks to the fact that `PlayerNotFoundException` class extends `Exception` class, it also inherits all it's\ncapabilities.\n\n```typescript\nclass PlayerNotFoundException extends Exception {\n  playerName: string;\n\n  constructor(playerName: string, previous?: unknown) {\n    super(`Player \"${playerName}\" not found.`, previous);\n    this.playerName = playerName;\n  }\n}\n```\n\n```typescript\ntry {\n  // some neat code here...\n  throw new Error('Database record not found');\n} catch(e: unknown) {\n  throw new PlayerNotFoundException('IdkMan2', e);\n}\n```\n\n```log\nPlayerNotFoundException: Player \"IdkMan2.\" not found.\n    at file:///path/to/project/src/real-world-example.js:13:11\n    at ModuleJob.run (node:internal/modules/esm/module_job:194:25)\nCaused by: Error: Database record not found\n    at file:///path/to/project/src/real-world-example.js:10:11\n    at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {\n  playerName: 'Failed to do some dangerous stuff.'\n}\n```\n","readmeFilename":"README.md"}