mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 01:00:29 -04:00
Merge from vscode 5b9869eb02fa4c96205a74d05cad9164dfd06d60 (#5607)
This commit is contained in:
@@ -382,7 +382,7 @@ class StatusBarEntryItem extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
private executeCommand(id: string, args?: unknown[]) {
|
||||
private async executeCommand(id: string, args?: unknown[]): Promise<void> {
|
||||
args = args || [];
|
||||
|
||||
// Maintain old behaviour of always focusing the editor here
|
||||
@@ -398,7 +398,11 @@ class StatusBarEntryItem extends Disposable {
|
||||
}
|
||||
*/
|
||||
this.telemetryService.publicLog('workbenchActionExecuted', { id, from: 'status bar' });
|
||||
this.commandService.executeCommand(id, ...args).then(undefined, err => this.notificationService.error(toErrorMessage(err)));
|
||||
try {
|
||||
await this.commandService.executeCommand(id, ...args);
|
||||
} catch (error) {
|
||||
this.notificationService.error(toErrorMessage(error));
|
||||
}
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
|
||||
Reference in New Issue
Block a user