fwd error when document cannot be opened, fixes #4577

This commit is contained in:
Johannes Rieken
2016-03-24 12:09:58 +01:00
parent 70de223772
commit 0edca427db

View File

@@ -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