Exceptions
tilttek/reading-questsEvery exception of the library implements Exception\ReadingQuestsExceptionInterface: catch it to catch them all.
| Exception | Extends | Raised when |
|---|---|---|
InvalidReadingQuest | InvalidArgumentException | A book, a shelf definition, a measure, a reading number, a reader, the facts of a step or a goal is out of its shape or its bounds; a measure in pages meets a book without a page count. |
UnknownBook | OutOfBoundsException | The shelf holds no book of the identifier asked. |
The packages underneath raise their own: Progress::record() raises the exceptions of phil/reading-progress for a
reader identifier or a position out of shape, Journal::record() raises those of tilttek/activity for a gesture
dated outside its window or a key recorded for another gesture, and a step's code or target out of shape raises
InvalidQuest of tilttek/quests.
Messages
| Message | Cause |
|---|---|
A book has 1 to 100000 pages; "tome" has 0. | A page count out of bounds. |
The book "tome" cannot set the fact "unit": the library sets it on the activities of reading. | The reserved fact. |
The book "rulebook" has no page count: give it one, or measure in minutes. | A measure in pages and a book without pages. |
The book "rulebook" is not the document "atlas". | The book given is not the document's. |
A reading is numbered 1 to 1000; 0 is not. | A reading number out of bounds. |
The reader "reader44" is not a resource reference such as "member:44". | A reader without a kind. |
The shelf holds no book "atlas". | UnknownBook. |