Skip to content

Exceptions

tilttek/party

Every exception of the library implements Exception\PartyException: catch this one to catch them all.

ExceptionThrown whenMessage
PartyRefusedThe party's rules refuse the act; refusal says whyThe refusal's message, below
UnknownPartyNo party holds the reference, no loot the key, or no note the keyNo party is known as "…"., The party "…" holds no loot under the key "…"., The party "…" holds no note under the key "…".
InvalidPartyA name, a key, a currency, a note's text, an amount, a quantity, a role, a role catalogue or a limit out of boundsWhat is out of bounds, and the bound

PartyRefused extends DomainException, UnknownParty OutOfBoundsException, InvalidParty InvalidArgumentException.

RefusalMessage
AlreadyFormedA party already holds this reference.
AlreadyMemberThis member already belongs to the party.
NotMemberThis member does not belong to the party.
FullThe party holds as many members as allowed.
TooManyPartiesThis member belongs to as many parties as allowed.
LootExistsThe party already holds loot under this key.
TooMuchLootThe party holds as many loot entries as allowed.
NotEnoughLootThe party holds fewer of this loot than asked.
NoteExistsThe party already holds a note under this key.
TooManyNotesThe party holds as many notes as allowed.
NotEnoughFundsThe purse holds less of this currency than asked.
NoOneToShareNo member is there to receive a share.

A new value is checked before the limits and the keys already taken: forming, joining, adding loot or writing a note with an invalid name, key or text throws InvalidParty even when the reference or the key is already taken.

The exceptions of phil/resource and tilttek/rpg-systems reach the caller unchanged when a reference is malformed or a system is read.