boofun.utils.exceptions.InvalidTruthTableError
- exception boofun.utils.exceptions.InvalidTruthTableError(message: str, code: ErrorCode | None = None, size: int | None = None, expected_size: int | None = None, context: Dict[str, Any] | None = None, suggestion: str | None = None)[source]
Raised when a truth table has invalid structure.
- Raised By:
bf.create() with list/array that is not power of 2
bf.create() with empty list
Factory.from_truth_table() with malformed data
- Error Codes:
E1300: Generic truth table error E1301: Wrong size (not power of 2) E1302: Empty truth table E1303: Invalid values (not boolean-convertible)
Example
>>> bf.create([0, 1, 1]) # Raises InvalidTruthTableError (size=3, not power of 2)