changeset 5fb107555e03 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset&node=5fb107555e03
description:
        Catch more exceptions on CSV import/export and improve message

        issue10979
        review387401002
diffstat:

 src/window.js |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (26 lines):

diff -r e639d87b9e24 -r 5fb107555e03 src/window.js
--- a/src/window.js     Wed Dec 29 12:29:19 2021 +0100
+++ b/src/window.js     Wed Dec 29 12:34:05 2021 +0100
@@ -1393,9 +1393,9 @@
                 preview: 1,
                 encoding: this.el_csv_encoding.val(),
                 error: function(err, file, inputElem, reason) {
-                    Sao.common.warning(
-                        Sao.i18n.gettext(
-                            'An error occured in loading the file.'));
+                    Sao.common.warning.run(
+                        reason,
+                        Sao.i18n.gettext("Detection failed"));
                 },
                 complete: function(results) {
                     results.data[0].forEach(function(word) {
@@ -1480,7 +1480,8 @@
                 encoding: encoding,
                 error: function(err, file, inputElem, reason) {
                     Sao.common.warning.run(
-                        Sao.i18n.gettext('Error occured in loading the file'))
+                        reason,
+                        Sao.i18n.gettext("Import failed"))
                         .always(prm.reject);
                 },
                 complete: function(results) {

Reply via email to