diff options
author | Maximilian Krambach <[email protected]> | 2018-04-27 18:03:09 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-04-27 18:03:09 +0000 |
commit | fda7b13f1b673962ce34b6f429158a7eb9cef47b (patch) | |
tree | 8b1f828c451c2d04ac5e8b311b7df27552405c59 /lang/js/src/Connection.js | |
parent | js: fixed empty operation setter in Message (diff) | |
download | gpgme-fda7b13f1b673962ce34b6f429158a7eb9cef47b.tar.gz gpgme-fda7b13f1b673962ce34b6f429158a7eb9cef47b.zip |
js: more testing
--
* Tests: initialization of the two modes, encryption
* gpgme.js: reintroduced message check before calling
Connection.post()
* gpgmejs_openpgp.js: Fixed openpgp mode not passing keys
* index.js: fixed some confusion in parseconfig()
* Inserted some TODO stubs for missing error handling
Diffstat (limited to 'lang/js/src/Connection.js')
-rw-r--r-- | lang/js/src/Connection.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lang/js/src/Connection.js b/lang/js/src/Connection.js index a10f9d9a..a198bdc6 100644 --- a/lang/js/src/Connection.js +++ b/lang/js/src/Connection.js @@ -100,9 +100,7 @@ export class Connection{ reject(gpgme_error('CONN_EMPTY_GPG_ANSWER')); } else if (msg.type === "error"){ me._connection.onMessage.removeListener(listener) - reject( - {code: 'GNUPG_ERROR', - msg: msg.msg} ); + reject(gpgme_error('GNUPG_ERROR', msg.msg)); } else { let answer_result = answer.add(msg); if (answer_result !== true){ @@ -129,6 +127,8 @@ export class Connection{ }, 5000); }]).then(function(result){ return result; + }, function(error){ + return error; }); } }); |