(error: unknown)
| 2 | * Converts any thrown value into a message suitable for diagnostics. |
| 3 | */ |
| 4 | export function getErrorMessage(error: unknown): string { |
| 5 | if (error instanceof Error) { |
| 6 | return error.message; |
| 7 | } |
| 8 | |
| 9 | return String(error); |
| 10 | } |
| 11 | |
| 12 | /** |
| 13 | * Returns whether a filesystem error means the requested path is absent. |
no outgoing calls
no test coverage detected