forked from ryanmwangi/CalMerger
catch error while trying to write to calendars file
This commit is contained in:
parent
7dfa5875fe
commit
e5202791ac
|
@ -136,8 +136,12 @@ function saveCalendarData(calendarId, linkGroupName, calendars) {
|
|||
linkGroupName: linkGroupName,
|
||||
calendars: calendars
|
||||
});
|
||||
|
||||
fs.writeFileSync(CALENDARS_FILE, JSON.stringify(calendarsData, null, 2));
|
||||
|
||||
try {
|
||||
fs.writeFileSync(CALENDARS_FILE, JSON.stringify(calendarsData, null, 2));
|
||||
} catch (error) {
|
||||
console.error('Error writing to calendars file:', error);
|
||||
}
|
||||
}
|
||||
|
||||
// Function to update the merged calendar
|
||||
|
|
Loading…
Reference in New Issue