Skip to content

Commit 25d9ea2

Browse files
committed
Use VsCommandError in place of Error
Signed-off-by: Denis Golovin dgolovin@redhat.com
1 parent f1c3f3d commit 25d9ea2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/k8s/common.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { QuickPickItem, window } from 'vscode';
77

88
import * as k8s from 'vscode-kubernetes-tools-api';
99
import * as Odo from '../odo';
10+
import { VsCommandError } from '../vscommand';
1011
import { Node } from './node';
1112

1213
function convertItemToQuickPick(item: any): QuickPickItem {
@@ -19,7 +20,7 @@ export async function getQuickPicks(cmd: string, errorMessage: string, converter
1920
const result = await Odo.getInstance().execute(cmd);
2021
const json = JSON.parse(result.stdout);
2122
if (json.items.length === 0) {
22-
throw Error(errorMessage);
23+
throw new VsCommandError(errorMessage);
2324
}
2425
return json.items.map(converter);
2526
}

0 commit comments

Comments
 (0)