Replace console.warn/error by reporting service calls
Change-Id: Ifbaccc9e72d2a09a3ac163c1cb0fb80f9f0e39e3
diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts
index d3d6010..939b23c 100644
--- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts
+++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts
@@ -758,7 +758,7 @@
if (changeReviewers) {
for (const key of Object.keys(changeReviewers)) {
if (key !== 'REVIEWER' && key !== 'CC') {
- console.warn('unexpected reviewer state:', key);
+ this.reporting.error(new Error(`Unexpected reviewer state: ${key}`));
continue;
}
if (!changeReviewers[key]) continue;
@@ -1085,9 +1085,8 @@
} else if (isReviewerGroupSuggestion(suggestion)) {
entry = suggestion.group;
} else {
- console.warn(
- 'received suggestion that was neither account nor group:',
- suggestion
+ this.reporting.error(
+ new Error(`Suggestion is neither account nor group: ${suggestion}`)
);
return false;
}