mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
no error codes, just error promises (#1396)
This commit is contained in:
@@ -9,7 +9,7 @@ import {illegalState} from 'vs/base/common/errors';
|
||||
import Event, {Emitter} from 'vs/base/common/event';
|
||||
import {WorkspaceConfiguration} from 'vscode';
|
||||
import {ExtHostConfigurationShape, MainThreadConfigurationShape} from './extHost.protocol';
|
||||
import {ConfigurationTarget, ConfigurationEditingResult} from 'vs/workbench/services/configuration/common/configurationEditing';
|
||||
import {ConfigurationTarget} from 'vs/workbench/services/configuration/common/configurationEditing';
|
||||
|
||||
export class ExtHostConfiguration extends ExtHostConfigurationShape {
|
||||
|
||||
@@ -56,11 +56,7 @@ export class ExtHostConfiguration extends ExtHostConfigurationShape {
|
||||
update: (key: string, value: any, global: boolean) => {
|
||||
key = section ? `${section}.${key}` : key;
|
||||
const target = global ? ConfigurationTarget.USER : ConfigurationTarget.WORKSPACE;
|
||||
return this._proxy.$updateConfigurationOption(target, key, value).then(value => {
|
||||
if (value !== ConfigurationEditingResult.OK) {
|
||||
throw new Error(ConfigurationEditingResult[value]);
|
||||
}
|
||||
});
|
||||
return this._proxy.$updateConfigurationOption(target, key, value);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user