I'm trying to remove the then statements from the following piece of code and then replace all the catches with try/catch statements. I'm having some issues knowing what to do with the then statements.
    export class WelcomePageContribution implements IWorkbenchContribution {
    constructor(
        @IInstantiationService instantiationService: IInstantiationService,
        @IConfigurationService configurationService: IConfigurationService,
        @IEditorService editorService: IEditorService,
        @IBackupFileService backupFileService: IBackupFileService,
        @IFileService fileService: IFileService,
        @IWorkspaceContextService contextService: IWorkspaceContextService,
        @ILifecycleService lifecycleService: ILifecycleService,
        @ICommandService private readonly commandService: ICommandService,
    ) {
        const enabled = isWelcomePageEnabled(configurationService, contextService);
        if (enabled && lifecycleService.startupKind !== StartupKind.ReloadedWindow) {
            backupFileService.hasBackups().then(hasBackups => {
                const activeEditor = editorService.activeEditor;
                if (!activeEditor && !hasBackups) {
                    const openWithReadme = configurationService.getValue(configurationKey) === 'readme';
                    if (openWithReadme) {
                        return Promise.all(contextService.getWorkspace().folders.map(folder => {
                            const folderUri = folder.uri;
                            return fileService.resolve(folderUri)
                                .then(folder => {
                                    const files = folder.children ? folder.children.map(child => child.name) : [];
                                    const file = arrays.find(files.sort(), file => strings.startsWith(file.toLowerCase(), 'readme'));
                                    if (file) {
                                        return joinPath(folderUri, file);
                                    }
                                    return undefined;
                                }, onUnexpectedError);
                        })).then(arrays.coalesce)
                            .then<any>(readmes => {
                                if (!editorService.activeEditor) {
                                    if (readmes.length) {
                                        const isMarkDown = (readme: URI) => strings.endsWith(readme.path.toLowerCase(), '.md');
                                        return Promise.all([
                                            this.commandService.executeCommand('markdown.showPreview', null, readmes.filter(isMarkDown), { locked: true }),
                                            editorService.openEditors(readmes.filter(readme => !isMarkDown(readme))
                                                .map(readme => ({ resource: readme }))),
                                        ]);
                                    } else {
                                        return instantiationService.createInstance(WelcomePage).openEditor();
                                    }
                                }
                                return undefined;
                            });
                    } else {
                        return instantiationService.createInstance(WelcomePage).openEditor();
                    }
                }
                return undefined;
            }).then(undefined, onUnexpectedError);
        }
    }
}
so that the entire thing reads more like this..
const enabled = await isWelcomePageEnabled(configurationService, contextService);
if (enabled && lifecycleService.startupKind !== StartupKind.ReloadedWindow) {
const hasBackups = await backupFileService.hasBackups();
const activeEditor = editorService.activeEditor;
if (!activeEditor && !hasBackups) {
    const openWithReadme = configurationService.getValue(configurationKey) === 'readme';
  if (openWithReadme) {
...
 
     
    