Class BookingException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.ntu.fdae.group1.bto.exceptions.BookingException
- All Implemented Interfaces:
Serializable
Exception thrown when errors occur during the booking process.
This exception indicates problems specific to booking operations, such as: - Eligibility issues that prevent booking completion - Conflicts with existing bookings - Invalid booking states or transitions - Quota or availability constraints - Timing issues related to booking windows
BookingException provides specific error information for the UI layer to present appropriate messages to users.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBookingException
(String message) Constructs a new BookingException with a detailed message.BookingException
(String message, Throwable cause) Constructs a new BookingException with a detailed message and cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BookingException
Constructs a new BookingException with a detailed message.- Parameters:
message
- The detail message explaining the booking error
-
BookingException
Constructs a new BookingException with a detailed message and cause.This constructor is useful when wrapping lower-level exceptions that occurred during the booking process.
- Parameters:
message
- The detail message explaining the booking errorcause
- The underlying cause of this exception
-