mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 09:59:47 -05:00
Merge VS Code 1.31.1 (#4283)
This commit is contained in:
@@ -8,7 +8,6 @@ import { validateConstraint } from 'vs/base/common/types';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||
import * as extHostTypes from 'vs/workbench/api/node/extHostTypes';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
@@ -56,7 +55,7 @@ export class ExtHostTasks implements ExtHostTasksShape {
|
||||
$executeContributedTask<T>(id: string, ...args: any[]): Thenable<T> {
|
||||
let command = this._tasks.get(id);
|
||||
if (!command) {
|
||||
return TPromise.wrapError<T>(new Error(`Contributed task '${id}' does not exist.`));
|
||||
return Promise.reject(new Error(`Contributed task '${id}' does not exist.`));
|
||||
}
|
||||
|
||||
let { callback, thisArg, description } = command;
|
||||
@@ -66,14 +65,14 @@ export class ExtHostTasks implements ExtHostTasksShape {
|
||||
try {
|
||||
validateConstraint(args[i], description.args[i].constraint);
|
||||
} catch (err) {
|
||||
return TPromise.wrapError<T>(new Error(`Running the contributed task:'${id}' failed. Illegal argument '${description.args[i].name}' - ${description.args[i].description}`));
|
||||
return Promise.reject(new Error(`Running the contributed task:'${id}' failed. Illegal argument '${description.args[i].name}' - ${description.args[i].description}`));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
let result = callback.apply(thisArg, args);
|
||||
return TPromise.as(result);
|
||||
return Promise.resolve(result);
|
||||
} catch (err) {
|
||||
// console.log(err);
|
||||
// try {
|
||||
@@ -81,11 +80,11 @@ export class ExtHostTasks implements ExtHostTasksShape {
|
||||
// } catch (err) {
|
||||
// //
|
||||
// }
|
||||
return TPromise.wrapError<T>(new Error(`Running the contributed task:'${id}' failed.`));
|
||||
return Promise.reject(new Error(`Running the contributed task:'${id}' failed.`));
|
||||
}
|
||||
}
|
||||
|
||||
$getContributedTaskHandlerDescriptions(): TPromise<{ [id: string]: any; }> {
|
||||
$getContributedTaskHandlerDescriptions(): Promise<{ [id: string]: any; }> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user