diff --git a/package.json b/package.json index fde0e12..562edf0 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "crypto-lib": "https://github.com/whiteout-io/crypto-lib/tarball/master", - "imap-client": "git+ssh://git@github.com:whiteout-io/imap-client.git#amd", + "imap-client": "git+ssh://git@github.com:whiteout-io/imap-client.git#master", "smtp-client": "git+ssh://git@github.com:whiteout-io/smtp-client.git#master", "requirejs": "2.1.8" }, diff --git a/src/js/crypto/crypto.js b/src/js/crypto/crypto.js index 183183c..588709f 100644 --- a/src/js/crypto/crypto.js +++ b/src/js/crypto/crypto.js @@ -323,6 +323,15 @@ define(function(require) { // return result from the worker options.callback(null, e.data); }; + worker.onerror = function(e) { + // show error message in console + console.error('Error handling web worker: Line ' + e.lineno + ' in ' + e.filename + ': ' + e.message); + // return error + options.callback({ + errMsg: (e.message) ? e.message : e + }); + return; + }; // send data to the worker worker.postMessage(options.args); return;