mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2025-01-18 02:20:48 +00:00
raise VBANCMDError on invalid kind
This commit is contained in:
parent
226fc5ead7
commit
372dba0b6b
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user