Skip to content

Exceptions

tilttek/guilds

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

ExceptionThrown whenMessage
GuildRefusedThe guild's rules refuse the act; refusal says whyThe refusal's message, below
UnknownGuildNo guild holds the reference, or no goal the keyNo guild is known as "…"., No goal is known as "…".
InvalidGuildA guild's name, capacity or metadata, a goal's key, name, target or deadline, a contribution's points or key, or a limit out of boundsWhat is out of bounds, and the bound

GuildRefused extends DomainException, UnknownGuild OutOfBoundsException, InvalidGuild InvalidArgumentException.

RefusalMessage
AlreadyFoundedA guild already holds this reference.
AlreadyMemberThis member already belongs to the guild.
AlreadyRequestedThis member already asked to join the guild.
NotMemberThis member does not belong to the guild.
NoRequestThis member has no request to join the guild.
FullThe guild holds as many members as its capacity.
TooManyGuildsThis member belongs to, or asked to join, as many guilds as allowed.
TooManyRequestsThe guild holds as many waiting requests as allowed.
NotAllowedThe role of this member does not allow this act.
FounderStaysThe founder hands the guild to another member before leaving it.
BelowMembersThe capacity cannot go below the members the guild holds.
GoalExistsA goal already holds this key.
TooManyGoalsThe guild holds as many open goals as allowed.
GoalOverThe goal is reached, closed or past its deadline.

The exceptions of phil/resource reach the caller unchanged when a reference is malformed.