Skip to content

Exceptions

tilttek/turn-clock

Every exception of the library implements Exception\TurnClockException: catch it to catch them all.

ExceptionExtendsWhen
Exception\InvalidClockInvalidArgumentExceptionA value out of its shape or its bounds: an identifier, a budget, an increment, too few or too many players, a player twice, a budget for a player not on the clock, a vacation too long or overlapping another, more than 8 vacations, a change of time of zero or too large.
Exception\ClockRefusedDomainExceptionA change not allowed on the clock in its state: started twice, not started, stopped, a turn passed by a player not holding it, a player named who is out of time or the one passing, a player out of time starting, a vacation already over, an identifier taken.
Exception\ClockNotFoundRuntimeExceptionNo clock has the identifier, or the clock has no such player.
Exception\ClockConflictRuntimeExceptionThe clock changed since it was read: the change is not kept, and is made again on what is read anew.