boofun.utils.exceptions.EvaluationError
- exception boofun.utils.exceptions.EvaluationError(message: str, code: ErrorCode | None = None, input_value: Any = None, representation: str | None = None, context: Dict[str, Any] | None = None, suggestion: str | None = None)[source]
Raised when function evaluation fails.
- Raised By:
bf.BooleanFunction.evaluate() when underlying callable fails
TruthTableRepresentation.convert_from() during truth table generation
Any operation that evaluates the function on inputs
- Error Codes:
E2000: Generic evaluation error E2001: Evaluation failed E2002: Underlying callable raised exception E2003: Index out of bounds E2004: Corrupted representation data
Example
>>> def bad_func(x): ... raise ValueError("oops") >>> f = bf.create(bad_func, n=2) >>> f.get_representation("truth_table") # Raises EvaluationError