exceptions.py 506 B

12345678910111213141516
  1. class BaseFakerException(Exception):
  2. """The base exception for all Faker exceptions."""
  3. class UniquenessException(BaseFakerException):
  4. """To avoid infinite loops, after a certain number of attempts,
  5. the "unique" attribute of the Proxy will throw this exception.
  6. """
  7. class UnsupportedFeature(BaseFakerException):
  8. """The requested feature is not available on this system."""
  9. def __init__(self, msg: str, name: str) -> None:
  10. self.name = name
  11. super().__init__(msg)