| 253 | * `.message` for user-facing output. |
| 254 | */ |
| 255 | export class EngineInvocationError extends Error { |
| 256 | readonly engine: string; |
| 257 | readonly bin: string; |
| 258 | readonly stderr: string; |
| 259 | readonly killed: boolean; |
| 260 | readonly code: number | null; |
| 261 | readonly signal: NodeJS.Signals | null; |
| 262 | readonly reason: 'timeout' | 'maxbuffer' | 'exit' | 'spawn'; |
| 263 | |
| 264 | constructor(params: { |
| 265 | engine: string; |
| 266 | bin: string; |
| 267 | stderr: string; |
| 268 | killed: boolean; |
| 269 | code: number | null; |
| 270 | signal: NodeJS.Signals | null; |
| 271 | reason: 'timeout' | 'maxbuffer' | 'exit' | 'spawn'; |
| 272 | message: string; |
| 273 | }) { |
| 274 | super(params.message); |
| 275 | this.name = 'EngineInvocationError'; |
| 276 | this.engine = params.engine; |
| 277 | this.bin = params.bin; |
| 278 | this.stderr = params.stderr; |
| 279 | this.killed = params.killed; |
| 280 | this.code = params.code; |
| 281 | this.signal = params.signal; |
| 282 | this.reason = params.reason; |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | const DEFAULT_TIMEOUT = 120_000; |
| 287 | const DEFAULT_MAXBUF = 1024 * 1024; |
nothing calls this directly
no outgoing calls
no test coverage detected