提交 a36931eb 编写于 作者: S Sandeep Somavarapu

add logging

上级 89012792
......@@ -12,6 +12,7 @@ import { cloneAndChange } from 'vs/base/common/objects';
import { ExtensionType } from 'vs/platform/extensions/common/extensions';
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
import { ILogService } from 'vs/platform/log/common/log';
import { toErrorMessage } from 'vs/base/common/errorMessage';
function transformIncomingURI(uri: UriComponents, transformer: IURITransformer | null): URI {
return URI.revive(transformer ? transformer.transformIncoming(uri) : uri);
......@@ -110,11 +111,14 @@ export class ExtensionManagementChannelClient implements IExtensionManagementSer
} catch (error) {
if (this.remote) {
try {
this.logService.error(`Error while installing '${extension.identifier.id}' extension in the remote server.`, toErrorMessage(error));
this.logService.info(`Trying to download '${extension.identifier.id}' extension locally and install`);
const compatible = await this.galleryService.getCompatibleExtension(extension);
if (compatible) {
const installed = await this.getInstalled(ExtensionType.User);
const location = await this.galleryService.download(compatible, installed.filter(i => areSameExtensions(i.identifier, extension.identifier))[0] ? InstallOperation.Update : InstallOperation.Install);
await this.install(URI.file(location));
this.logService.info(`Successfully installed '${extension.identifier.id}' extension`);
return;
}
} catch (e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册