From 42032964146effb7d66c043d79a41de41fb042e4 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Mon, 17 Feb 2020 18:38:30 +0100 Subject: [PATCH] Fix error message not being shown on write error Changelog-entry: Fix error message not being shown on write error Change-type: patch --- lib/gui/app/modules/image-writer.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/gui/app/modules/image-writer.ts b/lib/gui/app/modules/image-writer.ts index 98282407..81d79661 100644 --- a/lib/gui/app/modules/image-writer.ts +++ b/lib/gui/app/modules/image-writer.ts @@ -227,12 +227,15 @@ export function performWrite( !flashResults.cancelled && !_.get(flashResults, ['results', 'bytesWritten']) ) { - throw errors.createUserError({ - title: 'The writer process ended unexpectedly', - description: - 'Please try again, and contact the Etcher team if the problem persists', - code: 'ECHILDDIED', - }); + reject( + errors.createUserError({ + title: 'The writer process ended unexpectedly', + description: + 'Please try again, and contact the Etcher team if the problem persists', + code: 'ECHILDDIED', + }), + ); + return; } resolve(flashResults); });