From 064cfeb23d14c90e1bf252e960b904b2e1b03adc Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Fri, 23 Jun 2023 03:43:34 +0100 Subject: [PATCH] raise VMError on invalid kind --- voicemeeterlib/kinds.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/voicemeeterlib/kinds.py b/voicemeeterlib/kinds.py index e74b1c2..65840ac 100644 --- a/voicemeeterlib/kinds.py +++ b/voicemeeterlib/kinds.py @@ -1,6 +1,8 @@ from dataclasses import dataclass from enum import Enum, unique +from .error import VMError + @unique class KindId(Enum): @@ -105,7 +107,7 @@ def request_kind_map(kind_id): try: KIND_obj = kind_factory(kind_id) except ValueError as e: - print(e) + raise VMError(str(e)) from e return KIND_obj