Skip to content

Exceptions

tilttek/card-deck

Every exception of the library implements Tilttek\CardDeck\Exception\CardDeckException.

ExceptionRaised whenMessage, for instance
InvalidDefinitionAn identifier, a card, a deck, a gesture or a published game is refused when it is made or read: a name out of its pattern, a deck out of its bounds, data that does not decode, a client seed too longA deck holds 1 to 1024 cards.
IllegalGestureThe state of the game refuses a gesture: a zone empty or not open, a card the gesture cannot reach, a game not started or finished, too many zones or gestures; the state is left as it wasThe zone "draw" is empty.
UnknownGameThe store holds no game of that identifierThe store holds no game "g-7f3a".
ConcurrentChangeThe game changed since the version the change was made onThe game "g-7f3a" is at version 9, not 8.