* Handles file system errors appropriately * @param error The error to handle * @param path The file path that caused the error
(error: unknown, path: string)
| 155 | * @param path The file path that caused the error |
| 156 | */ |
| 157 | function handleFileSystemError(error: unknown, path: string): void { |
| 158 | if ( |
| 159 | typeof error === 'object' && |
| 160 | error && |
| 161 | 'code' in error && |
| 162 | error.code === 'ENOENT' |
| 163 | ) { |
| 164 | logForDebugging( |
| 165 | `Broken symlink or missing file encountered for settings.json at path: ${path}`, |
| 166 | ) |
| 167 | } else { |
| 168 | logError(error) |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | /** |
| 173 | * Parses a settings file into a structured format |
no test coverage detected