Show error when webview restore fails

This commit is contained in:
Matt Bierner
2018-04-05 19:18:55 -07:00
parent 753b18ddc1
commit c14e30aeb4
5 changed files with 23 additions and 10 deletions

View File

@@ -237,10 +237,10 @@ export class ExtHostWebviews implements ExtHostWebviewsShape {
state: any,
position: Position,
options: vscode.WebviewOptions
): Thenable<boolean> {
): Thenable<void> {
const serializer = this._serializers.get(viewType);
if (!serializer) {
return TPromise.as(false);
return TPromise.wrapError(new Error(`No serializer found for '${viewType}'`));
}
const revivedWebview = new ExtHostWebview(webviewHandle, this._proxy, viewType, typeConverters.toViewColumn(position), options);