forked from ryanmwangi/CalMerger
catch error while trying to write to calendars file
This commit is contained in:
parent
7dfa5875fe
commit
e5202791ac
|
@ -137,7 +137,11 @@ function saveCalendarData(calendarId, linkGroupName, calendars) {
|
|||
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