Exceptions
tilttek/homebrew-hubEvery exception of the library implements Exception\HomebrewException: catch it to catch them all.
| Exception | Extends | When |
|---|---|---|
Exception\InvalidHomebrew | InvalidArgumentException | A value out of its shape or its bounds: an identifier, a title, a summary, a tag, a rule, a variant, a release number, a lineage or endorsers too long, a search page, a draft document out of its format. When tilttek/table-rules refuses the content of a draft, its exception is the previous one. |
Exception\HomebrewRefused | DomainException | A change not allowed in the state of the homebrew or of the table: a publication by someone other than the author, the latest release again, a retired homebrew, a licence that forbids the remix, the most releases, credits, endorsements or subscriptions, an author who endorses their own homebrew, a release the table holds already, another game system, a table left without rules. |
Exception\HomebrewNotFound | RuntimeException | No homebrew has the identifier, the homebrew has no release of the number, or the table does not follow the homebrew. |
Exception\HomebrewConflict | RuntimeException | The homebrew or the subscription changed since it was read: the change is not kept, and is made again on what is read anew. |
Adoption writes the rules of a table through TableRules: what that service refuses — too many rules, a variant the
game system does not offer, a rulebook changed meanwhile — goes through as an exception of tilttek/table-rules, under
its TableRulesException, and the subscription is not kept.