from exceptions import Exception class EmptyDeck(Exception): def __str__(self): return "Deck is empty" class NameCollision(Exception): def __str__(self): return "Nickname already in use" class RuleError(Exception): def __init__(self, description = "General rule error"): self.description = description def __str__(self): return self.description