exception.py 580 B

1234567891011121314151617
  1. class validator_exception(Exception):
  2. def __init__(self, name: str):
  3. super().__init__("Invalid property names: " + name + ".")
  4. class exists_exception(Exception):
  5. def __init__(self, name: str):
  6. super().__init__("Item with this " + name + " already in database.")
  7. class not_ready_exception(Exception):
  8. def __init__(self, target: any):
  9. dump = str(target)
  10. what = str(type(target))
  11. info = "Can not work, because " + what + " is not raeady.\n"
  12. info = info + "Dump:\n" + what + "\n\n"
  13. super().__init__(info)