From 8ef5c96cb623e968b69d15e7204c074f25bdd49a Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 11 Oct 2019 20:20:12 +0200 Subject: [PATCH] Desktop: Fixes #1970: Display error message when notes cannot be exported --- ElectronClient/app/InteropServiceHelper.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ElectronClient/app/InteropServiceHelper.js b/ElectronClient/app/InteropServiceHelper.js index aa104094f4f..4fc5b7f9a0c 100644 --- a/ElectronClient/app/InteropServiceHelper.js +++ b/ElectronClient/app/InteropServiceHelper.js @@ -36,9 +36,13 @@ class InteropServiceHelper { if (options.sourceNoteIds) exportOptions.sourceNoteIds = options.sourceNoteIds; const service = new InteropService(); - const result = await service.export(exportOptions); - console.info('Export result: ', result); + try { + const result = await service.export(exportOptions); + console.info('Export result: ', result); + } catch (error) { + bridge().showErrorMessageBox(_('Could not export notes: %s', error.message)); + } dispatch({ type: 'WINDOW_COMMAND',