Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

exceptions.py 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. from django.db import DatabaseError
  2. class AmbiguityError(Exception):
  3. """More than one migration matches a name prefix."""
  4. pass
  5. class BadMigrationError(Exception):
  6. """There's a bad migration (unreadable/bad format/etc.)."""
  7. pass
  8. class CircularDependencyError(Exception):
  9. """There's an impossible-to-resolve circular dependency."""
  10. pass
  11. class InconsistentMigrationHistory(Exception):
  12. """An applied migration has some of its dependencies not applied."""
  13. pass
  14. class InvalidBasesError(ValueError):
  15. """A model's base classes can't be resolved."""
  16. pass
  17. class IrreversibleError(RuntimeError):
  18. """An irreversible migration is about to be reversed."""
  19. pass
  20. class NodeNotFoundError(LookupError):
  21. """An attempt on a node is made that is not available in the graph."""
  22. def __init__(self, message, node, origin=None):
  23. self.message = message
  24. self.origin = origin
  25. self.node = node
  26. def __str__(self):
  27. return self.message
  28. def __repr__(self):
  29. return "NodeNotFoundError(%r)" % (self.node,)
  30. class MigrationSchemaMissing(DatabaseError):
  31. pass
  32. class InvalidMigrationPlan(ValueError):
  33. pass