You create new exceptions but don’t verify whether existingExceptions already cover the same dates (beyond using them as “holidays”). That could lead to duplicates/overlaps if the caller passes prior exceptions not meant as holidays.
How to implement: Add a guard that checks overlap between generated ranges and existingExceptions date ranges; either skip overlapping dates or return an error.
File: ScheduleHoursDistributor.cls (generateCategoryScheduleExceptions, extractHolidayDates refactor to include ranges)