zoomy_core.symbolic.errors module

zoomy_core.symbolic.errors module#

Exceptions used by the symbolic primitive layer.

A primitive is a single, well-defined mathematical operation. When the caller invokes one whose preconditions don’t match the input, the primitive raises PrimitiveDoesNotMatch rather than silently no-op’ing or — worse — guessing. This is the explicit failure mode the redesign is built around: the caller must compose primitives with matching preconditions, and any mistake becomes a loud exception rather than a quiet wrong-form result.

exception zoomy_core.symbolic.errors.PrimitiveDoesNotMatch(primitive, atom, reason='')#

Bases: Exception

The primitive’s structural pattern did not match the input.

Carries the primitive name and the (sympy) atom that failed the match so the caller can localise the error.

Parameters:
  • primitive (str) –

  • reason (str) –