Skip to content

Commit

Permalink
do not log promise canceled messages
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Oct 30, 2017
1 parent 95eccd6 commit 48c4511
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/vs/workbench/parts/quickopen/browser/commandsHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { BoundedMap, ISerializedBoundedLinkedMap } from 'vs/base/common/map';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ResolvedKeybinding } from 'vs/base/common/keyCodes';
import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService';
import { isPromiseCanceledError } from 'vs/base/common/errors';

export const ALL_COMMANDS_PREFIX = '>';

Expand Down Expand Up @@ -263,9 +264,13 @@ abstract class BaseCommandEntry extends QuickOpenEntryGroup {
return nls.localize('entryAriaLabel', "{0}, commands", this.getLabel());
}

protected onError(error?: Error): void;
protected onError(messagesWithAction?: IMessageWithAction): void;
protected onError(arg1?: any): void {
private onError(error?: Error): void;
private onError(messagesWithAction?: IMessageWithAction): void;
private onError(arg1?: any): void {
if (isPromiseCanceledError(arg1)) {
return;
}

const messagesWithAction: IMessageWithAction = arg1;
if (messagesWithAction && typeof messagesWithAction.message === 'string' && Array.isArray(messagesWithAction.actions)) {
this.messageService.show(Severity.Error, messagesWithAction);
Expand Down

0 comments on commit 48c4511

Please sign in to comment.