X-Git-Url: https://code.delx.au/comingnext/blobdiff_plain/b333134fea283b646d4a40a8894eb44a0df767fc..a9a526f3ccbfa637b9794a17eb26f16023a15414:/comingNext/index.html diff --git a/comingNext/index.html b/comingNext/index.html index d06834b..965702f 100644 --- a/comingNext/index.html +++ b/comingNext/index.html @@ -416,6 +416,7 @@ function formatTime(date) function updateData() { + console.info('updateData()'); calcDaylightSaving(); try { // meetings have time @@ -429,6 +430,8 @@ function updateData() } } var meetingResult = calendarService.IDataSource.GetList(meetingListFiltering); + if (meetingResult.ErrorCode != 0) + throw("Error fetching calendar data: " + meetingResult.ErrorCode + ': ' + meetingResult.ErrorMessage); var meetingList = meetingResult.ReturnValue; // todos don't, they start on 00:00 hrs., but should be visible anyway @@ -655,11 +658,16 @@ function launchCalendar() function init() { + console.info('New widget instance starting up...'); + try { // call calendar service - calendarService = device.getServiceObject("Service.Calendar", "IDataSource"); + if (device != "undefined") + calendarService = device.getServiceObject("Service.Calendar", "IDataSource"); + else + throw('device object does not exist'); } catch(e) { - error('loading Calendar service'); + error('loading Calendar service: ' + e + ', line ' + e.line); return; } @@ -802,7 +810,7 @@ function loadSettings() } else config[key].Value = config[key].Default; - + console.info('Settings: ' + key + '=\'' + config[key].Value + '\''); } }