mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
fwd error when document cannot be opened, fixes #4577
This commit is contained in:
@@ -94,7 +94,7 @@ export class ExtHostEditors {
|
||||
if (editor) {
|
||||
return editor;
|
||||
} else {
|
||||
throw new Error('Failed to create editor with id: ' + id);
|
||||
throw new Error(`Failed to show text document ${document.uri.toString()}, should show in editor #${id}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -626,6 +626,10 @@ export class MainThreadEditors {
|
||||
|
||||
return this._workbenchEditorService.openEditor(input, position).then(editor => {
|
||||
|
||||
if (!editor) {
|
||||
return;
|
||||
}
|
||||
|
||||
return new TPromise<void>(c => {
|
||||
// not very nice but the way it is: changes to the editor state aren't
|
||||
// send to the ext host as they happen but stuff is delayed a little. in
|
||||
|
||||
Reference in New Issue
Block a user