1 | import { ChildProcessCrashedError } from './child-process-crashed-error.js';
|
2 |
|
3 | export class OutOfMemoryError extends ChildProcessCrashedError {
|
4 | constructor(pid: number | undefined, exitCode: number) {
|
5 | super(pid, `Process ${pid} ran out of memory`, exitCode);
|
6 | this.message = 'Process ';
|
7 | Error.captureStackTrace(this, OutOfMemoryError);
|
8 | // TS recommendation: https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
|
9 | Object.setPrototypeOf(this, OutOfMemoryError.prototype);
|
10 | }
|
11 | }
|