constant.py: logger.error then exit should be a raise exception instead

This commit is contained in:
brian khuu 2024-04-18 11:10:57 +10:00
parent dc2bff4059
commit cf38b4b831

View file

@ -1,7 +1,6 @@
from __future__ import annotations from __future__ import annotations
import logging import logging
import sys
from enum import Enum, IntEnum, auto from enum import Enum, IntEnum, auto
from typing import Any from typing import Any
@ -857,8 +856,7 @@ class GGUFValueType(IntEnum):
return GGUFValueType.INT32 return GGUFValueType.INT32
# TODO: need help with 64-bit types in Python # TODO: need help with 64-bit types in Python
else: else:
logger.error(f"Unknown type: {type(val)}") raise ValueError(f"Unknown type: {type(val)}")
sys.exit()
# Note: Does not support GGML_QKK_64 # Note: Does not support GGML_QKK_64