From 7798c3398bab18a8fc06054e9648444de5f75351 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Sun, 11 Sep 2016 10:26:25 -0700 Subject: [PATCH] refactor(GUI): remove `ErrorService.reportException()` ENOSPC workaround (#695) This function used to handle `ENOSPC` as a corner case in order to prevent it from being shown using the default Analytics/Dialog machinery. This was because the "alert ribbon" used to react to changes automatically from the templates, however, now that the "alert ribbon" was removed, and replaced it with modals, we have finer control of how and when this error gets shown, so the workaround is no longer necessary. See: https://github.com/resin-io/etcher/commit/951b8de9fc76821cf3140bd7e75c2d57ee8def21 Signed-off-by: Juan Cruz Viotti --- lib/gui/modules/error.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/gui/modules/error.js b/lib/gui/modules/error.js index c6e08835..a26456c0 100644 --- a/lib/gui/modules/error.js +++ b/lib/gui/modules/error.js @@ -41,14 +41,6 @@ error.service('ErrorService', function(AnalyticsService, OSDialogService) { * ErrorService.reportException(new Error('Something happened')); */ this.reportException = (exception) => { - - // This particular error is handled by the alert ribbon - // on the main application page. - if (exception.code === 'ENOSPC') { - AnalyticsService.logEvent('Drive ran out of space'); - return; - } - OSDialogService.showError(exception, exception.description); AnalyticsService.logException(exception); };