Source code for pyCardDeck.errors

# -*- coding: utf-8 -*-


[docs]class DeckException(Exception): """ Base exception class for pyCardDeck """ pass
[docs]class NoCards(DeckException): """ Exception that's thrown when there are no cards to be manipulated. """ pass
[docs]class OutOfCards(DeckException): """ Exception that's thrown when the deck runs out of cards. Unlike NoCardsException, this will happen naturally when reshuffling is disabled """ pass
[docs]class NotACard(DeckException): """ Exception that's thrown when the manipulated object is False/None """ pass
[docs]class CardNotFound(DeckException): """ Exception that's thrown when a card is not found """ pass
[docs]class UnknownFormat(Exception): """ Exception thrown when trying to export to a unknown format. Supported formats: YaML, JSON """ pass