Skip to content

Exceptions

tilttek/fantasy-calendar

Every exception of the library implements Tilttek\FantasyCalendar\Exception\FantasyCalendarException.

ExceptionRaised whenMessage, for instance
InvalidCalendarA calendar, a date or a value is refused: an inconsistent definition, a date that does not exist, an array that does not read — then with the place of the valuemonths.2.days: is a whole number.
OutOfRangeA computation would leave the bounds: a year beyond a million, a range of days too long, a registry fullA year lies from -1000000 to 1000000; it is 1000001.
CalendarMismatchTwo days of different calendars are compared or combined without converting one firstA day of the calendar "elves" is not a day of the calendar "empire": convert it first.
UnknownCalendarA calendar the registry does not hold, or two calendars no chain of links joinsNo calendar "moon" is registered.