From 7469536744105a8bb37ddaf455cd0d280b2521f9 Mon Sep 17 00:00:00 2001
From: Jaden Diefenbaugh <blakcap@users.noreply.github.com>
Date: Fri, 12 May 2017 15:31:06 +0200
Subject: [PATCH] throw error instead of logging, add logging for groupsService

---
 beat/web/reports/static/reports/app/services/groupsService.js | 2 ++
 beat/web/reports/static/reports/app/services/reportService.js | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/beat/web/reports/static/reports/app/services/groupsService.js b/beat/web/reports/static/reports/app/services/groupsService.js
index e4f8908f9..7a788cf30 100644
--- a/beat/web/reports/static/reports/app/services/groupsService.js
+++ b/beat/web/reports/static/reports/app/services/groupsService.js
@@ -284,6 +284,8 @@ angular.module('reportApp').factory('GroupsService', ['reportFactory', function(
 			reportItems.forEach(i => g.addReportItem(i.id, i.content));
 			Object.entries(aliases).forEach(([e, a]) => g.setAliasToExperiment(a, e));
 		});
+
+		console.log(groupsServiceInstance.groups);
 	};
 
 	return groupsServiceInstance;
diff --git a/beat/web/reports/static/reports/app/services/reportService.js b/beat/web/reports/static/reports/app/services/reportService.js
index 160963c2a..95934697f 100644
--- a/beat/web/reports/static/reports/app/services/reportService.js
+++ b/beat/web/reports/static/reports/app/services/reportService.js
@@ -103,7 +103,7 @@ angular.module('reportApp').factory('ReportService', ['GroupsService', 'plotterF
 			return reportFactory.getReportInformationFromNumber(number, '')
 			.then(res => rs.processReport(res.data));
 		} else {
-			console.error('UrlService could not parse the current URL');
+			throw new Error('UrlService could not parse the current URL');
 		}
 	};
 
-- 
GitLab