{"id":22311513,"url":"https://github.com/vilicvane/extendable-error","last_synced_at":"2025-07-29T08:32:18.435Z","repository":{"id":47827475,"uuid":"48809172","full_name":"vilicvane/extendable-error","owner":"vilicvane","description":"A simple extendable error class that extends Error.","archived":false,"fork":false,"pushed_at":"2023-05-12T10:52:34.000Z","size":77,"stargazers_count":8,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-30T15:41:55.093Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vilicvane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-12-30T16:21:58.000Z","updated_at":"2023-05-21T12:31:09.000Z","dependencies_parsed_at":"2022-09-25T14:51:33.351Z","dependency_job_id":"3d198d28-4b1f-4069-80cb-7e23c5a5577e","html_url":"https://github.com/vilicvane/extendable-error","commit_stats":null,"previous_names":["vilicvane/extendable-error","vilic/extendable-error"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilicvane%2Fextendable-error","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilicvane%2Fextendable-error/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilicvane%2Fextendable-error/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilicvane%2Fextendable-error/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vilicvane","download_url":"https://codeload.github.com/vilicvane/extendable-error/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227999487,"owners_count":17853915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T21:20:06.523Z","updated_at":"2024-12-03T21:20:08.124Z","avatar_url":"https://github.com/vilicvane.png","language":"TypeScript","readme":"# Extendable Error\n\n**YOU PROBABLY DON'T NEED THIS PACKAGE ANYMORE.**\n\nThe 6 lines of code below works well enough in modern JavaScript engines:\n\n```ts\nexport abstract class ExtendableError extends Error {\n  constructor(message?: string) {\n    super(message);\n    this.name = new.target.name;\n  }\n}\n```\n\n---\n\nA simple abstract extendable error class that extends `Error`, which handles the error `name`, `message` and `stack` property.\n\n## Install\n\n```sh\nnpm install extendable-error --save\n```\n\n## Usage\n\n```ts\nimport ExtendableError from \"extendable-error\";\n\nclass SomeError extends ExtendableError {\n  constructor(message: string, public code: number) {\n    super(message);\n  }\n}\n\nlet someError = new SomeError(\"Some error\", 0x0001);\n```\n\n## License\n\nMIT License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvilicvane%2Fextendable-error","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvilicvane%2Fextendable-error","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvilicvane%2Fextendable-error/lists"}