From 372dba0b6b7f4f9f8b45c943b259d7eede460f2c Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sun, 25 Jun 2023 13:50:21 +0100 Subject: [PATCH] raise VBANCMDError on invalid kind --- vban_cmd/kinds.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vban_cmd/kinds.py b/vban_cmd/kinds.py index 0ca4003..43b14e1 100644 --- a/vban_cmd/kinds.py +++ b/vban_cmd/kinds.py @@ -1,6 +1,8 @@ from dataclasses import dataclass from enum import Enum, unique +from .error import VBANCMDError + @unique class KindId(Enum): @@ -97,7 +99,7 @@ def request_kind_map(kind_id): try: KIND_obj = kind_factory(kind_id) except ValueError as e: - print(e) + raise VBANCMDError(str(e)) from e return KIND_obj