Skip to content

Exceptions

tilttek/player-knowledge

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

ExceptionExtendsWhen
Exception\InvalidKnowledgeInvalidArgumentExceptionA value is out of its shape or its bounds: an identifier, a title, a version, a knower key, no knower or more than 500, more than 64 secrets for one entry, a revelation shared by nobody, everyone forgotten.
Exception\KnowledgeRefusedDomainExceptionThe call is well formed but not allowed: a campaign of 5 000 secrets, a character sharing what it does not know or with itself, a revelation taken back that was never made.
Exception\SecretNotFoundRuntimeExceptionNo secret has the identifier.
Exception\KnowledgeConflictRuntimeExceptionWhat is kept changed since it was read: a secret at another version, a new one of a kept identifier, a revelation already kept. The call is made again on what is read anew.