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