This commit is contained in:
Matt Bierner
2019-04-12 11:10:18 -07:00
parent 668068e26f
commit c79f1cd8e3
2 changed files with 4 additions and 6 deletions

View File

@@ -399,8 +399,7 @@ export class MarkdownPreview extends Disposable {
this.editor.webview.options = MarkdownPreview.getWebviewOptions(resource, this._contributionProvider.contributions);
this.editor.webview.html = content;
}
}
catch (e) {
} catch {
await this.showFileNotFoundError();
}
}
@@ -463,8 +462,7 @@ export class MarkdownPreview extends Disposable {
try {
vscode.workspace.openTextDocument(this._resource).then(vscode.window.showTextDocument);
}
catch (e) {
} catch {
await this.showFileNotFoundError();
}
}

View File

@@ -90,9 +90,9 @@ export class MarkdownContentProvider {
</html>`;
}
public async provideFileNotFoundContent(
public provideFileNotFoundContent(
resource: vscode.Uri,
): Promise<string> {
): string {
const resourcePath = path.basename(resource.fsPath);
const body = localize('preview.notFound', '{0} cannot be found', resourcePath);
return `<!DOCTYPE html>