Skip to content

Exceptions

tilttek/advent-calendar

Every exception of the library implements Tilttek\AdventCalendar\Exception\AdventCalendarException.

ExceptionRaised whenMessage, for instance
InvalidCalendarAn identifier, a timezone, a date, a count of boxes, a closing date, a catch-up, a surprise's reference or quantity is refused, or a box is asked for by a day the calendar has none forThe calendar "advent-2026" has boxes 1 to 24; 25 is not one.
BoxNotOpenableA box never opened is opened before its day, or after its windowThe box 4 of the calendar "advent-2026" opens at 2026-12-04T00:00:00+01:00.