Coverage for src/galaxy_beep_frame/exception/converter/invalid_byte.py: 100%
4 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-08-31 04:18 +0200
« prev ^ index » next coverage.py v7.15.2, created at 2026-08-31 04:18 +0200
1"""InvalidByteError class."""
3from .lexer import LexerError
6class InvalidByteError(LexerError):
7 """Invalid byte received."""
9 def __init__(self, value: int, possible_values: str) -> None:
10 """
11 Error initialization.
13 Parameters
14 ----------
15 value: int
16 The invalid byte.
17 possible_values: str
18 Name of the possible values (eg. "numeric")
20 """
22 super().__init__(
23 f"Unknown byte: {chr(value)} not {possible_values}."
24 )