rics.mapping.exceptions#

Mapping errors.

Classes

Any(*args, **kwargs)

Special type indicating an unconstrained type.

Exceptions

AmbiguousScoreError(kind, key, match0, ...)

Indicates that the scoring logic has produces ambiguous scores.

BadFilterError(msg)

Invalid filter.

CardinalityError(msg)

Base class for cardinality issues.

MappingError(msg)

Something failed to map.

MappingWarning

Something failed to map.

ScoringDisabledError(value, candidates, context)

Indicates that the scoring logic has been disabled.

UserMappingError(msg, value, candidates)

A user-defined mapping function did something forbidden.

UserMappingWarning

A user-defined mapping function did something strange.

exception MappingError(msg: str)[source]#

Bases: ValueError

Something failed to map.

exception ScoringDisabledError(value: Any, candidates: Any, context: Any)[source]#

Bases: MappingError

Indicates that the scoring logic has been disabled. Raised by score_functions.disabled().

exception AmbiguousScoreError(kind: str, key: Any, match0: Any, match1: Any, cardinality: str, scores: str)[source]#

Bases: MappingError

Indicates that the scoring logic has produces ambiguous scores.

exception UserMappingError(msg: str, value: Any, candidates: Set[Any])[source]#

Bases: MappingError

A user-defined mapping function did something forbidden.

exception CardinalityError(msg: str)[source]#

Bases: MappingError

Base class for cardinality issues.

exception MappingWarning[source]#

Bases: UserWarning

Something failed to map.

exception UserMappingWarning[source]#

Bases: MappingWarning

A user-defined mapping function did something strange.

exception BadFilterError(msg: str)[source]#

Bases: MappingError

Invalid filter.