Робота з винятками календаря

Поводження з винятками Методи Setoccurrences та SetenteredByOCCURENCES, викриті класом Calendarexception, використовується для обробки випадків за винятком. Випадки підтримують цілий тип даних, а EnteredByEccurrences підтримує булевий тип даних.

Приклад програмування

Наступні рядки коду зроблять виняток дійсним протягом п’яти років.

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.