You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Update CHANGELOG.md with granular error classes entry
refactor: Define and use granular error classes
- Updated `CHANGELOG.md` to include the entry for defining granular error classes.
- Defined `FileNotFoundError` and `InvalidManifestError` in `errors.ts`.
- Modified `FileHandler` to throw `FileNotFoundError` when a file is not found.
- Modified `ManifestParser` to throw `InvalidManifestError` for invalid JSON or regex matches.
- Updated `index.ts` to catch and handle these new specific error types.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@ All notable changes for each version of the Ambient Music extension.
8
8
9
9
- refactor: Moved `UpdaterRegistry` to `src/registry` for better organization and updated all relevant imports.
10
10
- refactor: Applied Dependency Inversion Principle (DIP) by passing `FileHandler` as a dependency to `ManifestParser`, and `ManifestParser` as a dependency to updaters. This improves testability and flexibility.
11
+
- refactor: Defined more granular error classes (`FileNotFoundError`, `InvalidManifestError`) within `errors.ts` to enable more precise error handling and user feedback.
12
+
- refactor: Updated `FileHandler` and `ManifestParser` to throw these specific errors, and `index.ts` to catch and handle them.
0 commit comments