Skip to content

Commit cfd0896

Browse files
jrichter1dgolovin
authored andcommitted
Change a couple error conditions to VsCommandError
1 parent 8fd644d commit cfd0896

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/openshift/component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export class Component extends OpenShiftItem {
367367

368368
const componentPresent = (await Component.odo.getComponents(component.getParent())).filter((target: OpenShiftComponent) => target.contextValue !== ContextType.COMPONENT && target.kind === ComponentKind.S2I);
369369

370-
if (componentPresent.length === 1) throw Error('You have no S2I Components available to link, please create new OpenShift Component and try again.');
370+
if (componentPresent.length === 1) throw new VsCommandError('You have no S2I Components available to link, please create new OpenShift Component and try again.');
371371

372372
const componentToLink = await window.showQuickPick(componentPresent.filter((comp)=> comp.getName() !== component.getName()), {placeHolder: 'Select a Component to link', ignoreFocusOut: true});
373373

@@ -447,7 +447,7 @@ export class Component extends OpenShiftItem {
447447
if (getPushCmd.pushCmd && getPushCmd.contextPath) {
448448
Component.odo.executeInTerminal(getPushCmd.pushCmd, getPushCmd.contextPath, `OpenShift: Push '${getPushCmd.name}' Component`);
449449
} else {
450-
throw Error('No existing push command found');
450+
throw new VsCommandError('No existing push command found');
451451
}
452452
}
453453

0 commit comments

Comments
 (0)