Skip to content

Exceptions

tilttek/handouts

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

ExceptionExtendsThrown when
Exception\InvalidHandoutInvalidArgumentExceptionA value is out of bounds: a title, a text, an attachment, a media type, a cue, an audience or a limit
Exception\UnknownHandoutOutOfBoundsExceptionNo handout holds the reference
Exception\HandoutRefusedDomainExceptionAn act the rules refuse, with its Refusal in $refusal

A value is checked before the store is read: an invalid handout is refused as InvalidHandout even when its reference is taken.

Refusals

RefusalMessage
AlreadyCreatedA handout already holds this reference.
TooManyHandoutsThe table holds as many handouts as allowed.
TooManyAttachmentsThe handout holds more attachments than allowed.
MediaTypeNotAllowedAn attachment has a media type the application does not allow.
AudienceTooLargeThe audience names more players than allowed.
TooManyRevealedThe handout is revealed to as many audiences as allowed.
TooManyStagedThe handout holds as many staged reveals as allowed.
NotRevealedThe handout is not revealed to this player.

The messages are in English for logs; an application translates the Refusal value, already_created and so on, for its users.