From 31bc03fb8ace68ddb9fce39f60b48219ba970c9e Mon Sep 17 00:00:00 2001 From: Michael Prager Date: Thu, 7 Jan 2010 14:53:03 +0100 Subject: [PATCH] output more debug info --- comingNext/index.html | 7 ++++++- comingNextB/index.html | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/comingNext/index.html b/comingNext/index.html index d06834b..5730519 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,6 +658,8 @@ function launchCalendar() function init() { + console.info('New widget instance starting up...'); + try { // call calendar service calendarService = device.getServiceObject("Service.Calendar", "IDataSource"); @@ -802,7 +807,7 @@ function loadSettings() } else config[key].Value = config[key].Default; - + console.info('Settings: ' + key + '=\'' + config[key].Value + '\''); } } diff --git a/comingNextB/index.html b/comingNextB/index.html index 30dead4..35feef0 100644 --- a/comingNextB/index.html +++ b/comingNextB/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,6 +658,8 @@ function launchCalendar() function init() { + console.info('New widget instance starting up...'); + try { // call calendar service calendarService = device.getServiceObject("Service.Calendar", "IDataSource"); @@ -802,7 +807,7 @@ function loadSettings() } else config[key].Value = config[key].Default; - + console.info('Settings: ' + key + '=\'' + config[key].Value + '\''); } } -- 2.39.2