From f0af7ad54b029039ed66047e9e7125546762c707 Mon Sep 17 00:00:00 2001 From: Michael Prager Date: Sat, 21 May 2011 01:01:36 +0200 Subject: [PATCH] improved error messages --- comingNext/index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/comingNext/index.html b/comingNext/index.html index e02a484..0551a3e 100644 --- a/comingNext/index.html +++ b/comingNext/index.html @@ -240,7 +240,7 @@ function collectLocales() try { var result = calendarService.IDataSource.Add(criteria); if (result.ErrorCode) - error(result.ErrorMessage); + throw(result.ErrorMessage); } catch (e) { error("collectLocales: " + e + ', line ' + e.line); } @@ -262,7 +262,7 @@ function collectLocales() throw(result.ErrorMessage); var list = result.ReturnValue; } catch(e) { - error(e + ', line ' + e.line); + error("collectLocales: " + e + ', line ' + e.line); return; } var ids = new Array(); @@ -294,7 +294,7 @@ function collectLocales() counter++; } } catch(e) { - error(e + ', line ' + e.line); + error("collectLocales: " + e + ', line ' + e.line); return; } log(ids); @@ -1088,7 +1088,7 @@ function getSettingsCalEntryId() } var result = calendarService.IDataSource.GetList(listFiltering); if (result.ErrorCode) { - error(result.ErrorMessage); + error('getSettingsCalEntryId: GetList() failed: ' + result.ErrorMessage); return; } var list = result.ReturnValue; @@ -1110,7 +1110,7 @@ function getSettingsCalEntryId() try { var result = calendarService.IDataSource.Add(criteria); if (result.ErrorCode) - error(result.ErrorMessage); + throw(result.ErrorMessage); } catch (e) { error("getSettingsCalEntryId: " + e + ', line ' + e.line); } @@ -1137,7 +1137,7 @@ function loadSettings() } var result = calendarService.IDataSource.GetList(listFiltering); if (result.ErrorCode) { - error(result.ErrorMessage); + error('loadSettings: GetList() failed: ' + result.ErrorMessage); return; } var entry = result.ReturnValue.getNext(); @@ -1226,7 +1226,7 @@ function saveSettings() try { var result = calendarService.IDataSource.Add(criteria); if (result.ErrorCode) - error(result.ErrorMessage); + throw(result.ErrorMessage); } catch (e) { error("saveSettings: " + e + ', line ' + e.line); } -- 2.39.2