boofun.utils.exceptions.ConversionError
- exception boofun.utils.exceptions.ConversionError(message: str, code: ErrorCode | None = None, source_repr: str | None = None, target_repr: str | None = None, context: Dict[str, Any] | None = None, suggestion: str | None = None)[source]
Raised when representation conversion fails.
- Raised By:
bf.BooleanFunction.get_representation() when no path exists
bf.BooleanFunction._compute_representation() on conversion failure
Representation strategies during convert_to/convert_from
- Error Codes:
E3000: Generic conversion error E3001: No conversion path exists E3002: Conversion algorithm failed E3003: Incompatible representations E3004: No representations available (empty function)
Example
>>> f = bf.BooleanFunction(n=2) # No representations >>> f.get_representation("fourier") # Raises ConversionError