krrood.entity_query_language.verbalization.exceptions#
Custom exceptions raised by the EQL verbalization subsystem.
Each is a DataclassException — a dataclass exception that
carries the structured cause as fields and composes its human-readable message from
error_message() / suggest_correction() — so the failure data is inspectable (not
only a formatted string), consistent with the rest of krrood.
Exceptions#
A |
|
A predicate's |
|
No grammar rule covers an EQL construct — a coverage gap, surfaced as an error |
|
A fragment kind with no fold handler reached a renderer — a realisation pass was |
|
A concrete :class:`~krrood.entity_query_language.verbalization.grammar.conditions.pl |
|
An aggregator type has no verbalization phrase — a coverage gap surfaced when a new |
|
Two or more grammar rules (or specificity-ranked forms) are equally specific for the |
Module Contents#
- exception krrood.entity_query_language.verbalization.exceptions.PredicateFragmentRequiredError#
Bases:
krrood.exceptions.DataclassExceptionA
Verbalizablepredicate was verbalized without implementing_verbalization_fragment_. A predicate must state its surface as a structured fragment clause (there is no name-based string fallback), so the omission is an error rather than a degraded “a HasHighSalary, where …” rendering.- node: krrood.entity_query_language.core.variable.InstantiatedVariable#
The instantiated predicate whose type supplies no verbalization fragment.
- error_message() str#
- Returns:
A human-readable description of what went wrong.
- suggest_correction() str#
- Returns:
Advice on how to fix the error, or an empty string if there is no specific advice.
- exception krrood.entity_query_language.verbalization.exceptions.NonFragmentPredicateError#
Bases:
krrood.exceptions.DataclassExceptionA predicate’s
_verbalization_fragment_returned something that is not aVerbalizationFragment(e.g. a leftover format string).Fragments are required so the surface composes with the realisation passes (negation, coreference, morphology).
- predicate_type: type#
The predicate type whose hook returned a non-fragment.
- returned: object#
The non-fragment value the hook returned.
- error_message() str#
- Returns:
A human-readable description of what went wrong.
- suggest_correction() str#
- Returns:
Advice on how to fix the error, or an empty string if there is no specific advice.
- exception krrood.entity_query_language.verbalization.exceptions.UnverbalizableExpressionError#
Bases:
krrood.exceptions.DataclassExceptionNo grammar rule covers an EQL construct — a coverage gap, surfaced as an error rather than silently degrading the node to its class name.
- node: krrood.entity_query_language.core.base_expressions.SymbolicExpression#
The EQL expression no grammar rule matched.
- error_message() str#
- Returns:
A human-readable description of what went wrong.
- suggest_correction() str#
- Returns:
Advice on how to fix the error, or an empty string if there is no specific advice.
- exception krrood.entity_query_language.verbalization.exceptions.UnloweredFragmentError#
Bases:
krrood.exceptions.DataclassExceptionA fragment kind with no fold handler reached a renderer — a realisation pass was skipped, leaving an un-lowered
NounPhraseorPossessiveChainin the tree.- fragment: krrood.entity_query_language.verbalization.fragments.base.VerbalizationFragment#
The un-lowered fragment that reached the renderer.
- error_message() str#
- Returns:
A human-readable description of what went wrong.
- suggest_correction() str#
- Returns:
Advice on how to fix the error, or an empty string if there is no specific advice.
- exception krrood.entity_query_language.verbalization.exceptions.UndeclaredFormPositionError#
Bases:
krrood.exceptions.DataclassExceptionA concrete
ConditionFormsubclass did not declare itspositionclass variable — caught at class-definition time rather than as a silentAttributeErrordeep inplace.- form: type[ConditionForm]#
The condition-form subclass missing its
position.
- error_message() str#
- Returns:
A human-readable description of what went wrong.
- suggest_correction() str#
- Returns:
Advice on how to fix the error, or an empty string if there is no specific advice.
- exception krrood.entity_query_language.verbalization.exceptions.UnknownAggregatorError#
Bases:
krrood.exceptions.DataclassExceptionAn aggregator type has no verbalization phrase — a coverage gap surfaced when a new
Aggregatorsubtype is added without a matching entry inAggregations.- aggregator_type: type[Aggregator]#
The aggregator type that maps to no aggregation phrase.
- error_message() str#
- Returns:
A human-readable description of what went wrong.
- suggest_correction() str#
- Returns:
Advice on how to fix the error, or an empty string if there is no specific advice.
- exception krrood.entity_query_language.verbalization.exceptions.AmbiguousRuleError#
Bases:
krrood.exceptions.DataclassExceptionTwo or more grammar rules (or specificity-ranked forms) are equally specific for the same dispatch target — a collision that would otherwise resolve silently by registration order.
Surfaced as an error so an accidental overlap is caught rather than masked.
- subject: object#
The expression or request being dispatched when the collision occurred.
- candidates: list[type]#
The equally-specific rule/form classes that collided.
- error_message() str#
- Returns:
A human-readable description of what went wrong.
- suggest_correction() str#
- Returns:
Advice on how to fix the error, or an empty string if there is no specific advice.