# -*- coding: utf-8 -*-
"""
Transliteration exceptions used in Graph Transliterator.
"""
[docs]class GraphTransliteratorException(Exception):
"""
Base exception class. All Graph Transliterator-specific exceptions should
subclass this class.
"""
[docs]class AmbiguousTransliterationRulesException(GraphTransliteratorException):
"""
Raised when multiple transliteration rules can match the same pattern.
Details of ambiguities are given in a :func:`logging.warning`.
"""
class IncompleteGraphCoverageException(GraphTransliteratorException):
"""
Raised when checking if all the nodes or edges have not been visited during a
check of graph coverage. Used when checking the coverage of bundled transliterators.
"""
class IncompleteOnMatchRulesCoverageException(GraphTransliteratorException):
"""
Raised when checking if all the on match rules have not been activated.
Used when checking the coverage of bundled transliterators.
"""
class IncorrectVersionException(GraphTransliteratorException):
"""
Raised if the GraphTransliterator being loaded is of a later
version than the current library.
"""
[docs]class NoMatchingTransliterationRuleException(GraphTransliteratorException):
"""
Raised when no transliteration rule can be matched at a particular
location in the input string's tokens. Details of the location are given
in a :func:`logging.warning`.
"""