EN · DE · RU · FR · ES

#2782: EventNotFoundException.java

projectforge-wicket/src/main/java/net/ftlines/wicket/fullcalendar/EventNotFoundException.java Java Exception (FullCalendar Domain) · projectforge-wicket/src/main/java/net/ftlines/wicket/fullcalendar/EventNotFoundException.java 44 lines · 6 code · 33 comments · 5 blank
A typed runtime exception thrown when EventManager cannot locate a calendar event by its ID. Extends RuntimeException (unchecked) with a single constructor accepting an error message. This exception is part of the FullCalendar module's domain exception vocabulary — it enables callers higher in the Wicket callback handling stack to distinguish "event not found" from "event source not found" and from infrastructure failures, and to handle each case appropriately (typically by sending a revert command to the client).

Architecture

Why RuntimeException?

The exception extends RuntimeException rather than a checked exception because it's typically thrown from within Wicket Ajax callback handlers, where checked exceptions would complicate the callback contract. Wicket's Ajax framework already has exception handling at the behavior level — an unchecked exception propagates naturally through the callback chain and can be caught by a generic error handler that sends a failure response to the client.

Relationship to EventSourceNotFoundException

Together with EventSourceNotFoundException (file #2785), this forms a two-tier exception hierarchy for the lookup chain. The source exception fires when a UUID doesn't match any registered source; the event exception fires when the source exists but doesn't contain the specified event. Callers can catch the source exception to handle missing-source scenarios (e.g., the source was removed between rendering and callback) separately from missing-event scenarios (e.g., the event was deleted by another user).

Git History

CommitWhat changed
868d6abb7 through ceb63e8a1Six annual copyright header updates. The exception class has never been modified beyond its initial creation — its minimal design (constructor accepting a message string, no additional fields) is sufficient for all lookup failure scenarios.