提交 14803516 编写于 作者: B Benjamin Pasero

make sure the workbench does not fall over a runtime exception during startup

上级 54609ce3
......@@ -258,7 +258,7 @@ export class Workbench implements IPartService {
}));
// Flag workbench as created once done
TPromise.join(compositeAndEditorPromises).then(() => {
const workbenchDone = (error?: Error) => {
this.workbenchCreated = true;
this.eventService.emit(EventType.WORKBENCH_CREATED);
this.creationPromiseComplete(true);
......@@ -266,7 +266,13 @@ export class Workbench implements IPartService {
if (this.callbacks && this.callbacks.onWorkbenchStarted) {
this.callbacks.onWorkbenchStarted();
}
}, errors.onUnexpectedError);
if (error) {
errors.onUnexpectedError(error);
}
};
TPromise.join(compositeAndEditorPromises).then(() => workbenchDone(), (error) => workbenchDone(error));
} catch (error) {
// Print out error
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册