* Send error event to renderer
(processId: string, error: string)
| 286 | * Send error event to renderer |
| 287 | */ |
| 288 | function sendError(processId: string, error: string): void { |
| 289 | const proc = activeProcesses.get(processId) |
| 290 | if (!proc) return |
| 291 | |
| 292 | proc.completed = true |
| 293 | proc.completedAt = Date.now() |
| 294 | proc.error = error |
| 295 | |
| 296 | emitLifecycle({ type: "error", processId, error }) |
| 297 | |
| 298 | // Schedule cleanup |
| 299 | scheduleCleanup(processId) |
| 300 | } |
| 301 | |
| 302 | /** |
| 303 | * Setup process event handlers |
no test coverage detected