Exceptions
tilttek/player-knowledgeEvery exception of the library implements Exception\PlayerKnowledgeExceptionInterface: catch it to catch them all.
| Exception | Extends | When |
|---|---|---|
Exception\InvalidKnowledge | InvalidArgumentException | A 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\KnowledgeRefused | DomainException | The 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\SecretNotFound | RuntimeException | No secret has the identifier. |
Exception\KnowledgeConflict | RuntimeException | What 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. |