* Create a unique ID for an error based on its characteristics.
(code: number, message: string, sourceFile: string | undefined)
| 50 | * Create a unique ID for an error based on its characteristics. |
| 51 | */ |
| 52 | function createErrorId(code: number, message: string, sourceFile: string | undefined): string { |
| 53 | const parts = [String(code), message]; |
| 54 | if (sourceFile) { |
| 55 | parts.push(sourceFile); |
| 56 | } |
| 57 | // Simple hash: join and create a stable string |
| 58 | return parts.join("|"); |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Error handler callback type. |