Handling Occurrences for Exceptions

Handling Occurrences for Exceptions The setOccurrences and setEnteredbyOccurences methods exposed by the CalendarException class is used to handle occurrences for an exception. Occurrences supports the integer data type, and EnteredByOccurrences supports a Boolean data type.

Programming Example

The following lines of code will make the exception valid for five years.

1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
2// The path to the documents directory.
3String dataDir = Utils.getDataDir(HandleOccurrences.class);
4
5CalendarException except = new CalendarException();
6except.setEnteredByOccurrences(true);
7except.setOccurrences(5);
8except.setType(CalendarExceptionType.YearlyByDay);
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.