src/vs/workbench/contrib/files/electron-sandbox/textFileEditor.ts/NativeTextFileEditor/handleSetInputError
class NativeTextFileEditor:	protected override handleSetInputError(error: Error, input: FileEditorInput, options: ITextEditorOptions | undefined): Promise<void> {

		// Allow to restart with higher memory limit if the file is too large
		if ((<FileOperationError>error).fileOperationResult === FileOperationResult.FILE_EXCEEDS_MEMORY_LIMIT) {
			const memoryLimit = Math.max(MIN_MAX_MEMORY_SIZE_MB, +this.textResourceConfigurationService.getValue<number>(undefined, 'files.maxMemoryForLargeFilesMB') || FALLBACK_MAX_MEMORY_SIZE_MB);

			throw createErrorWithActions(localize('fileTooLargeForHeapError', "To open a file of this size, you need to restart and allow {0} to use more memory", this.productService.nameShort), [
				toAction({
					id: 'workbench.window.action.relaunchWithIncreasedMemoryLimit', label: localize('relaunchWithIncreasedMemoryLimit', "Restart with {0} MB", memoryLimit), run: () => {
						return this.nativeHostService.relaunch({
							addArgs: [
								`--max-memory=${memoryLimit}`
							]
						});
					}
				}),
				toAction({
					id: 'workbench.window.action.configureMemoryLimit', label: localize('configureMemoryLimit', 'Configure Memory Limit'), run: () => {
						return this.preferencesService.openUserSettings({ query: 'files.maxMemoryForLargeFilesMB' });
					}
				}),
			]);
		}

		// Fallback to handling in super type
		return super.handleSetInputError(error, input, options);
	}