aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src/Errors.js
diff options
context:
space:
mode:
authorMaximilian Krambach <[email protected]>2018-04-25 09:32:21 +0000
committerMaximilian Krambach <[email protected]>2018-04-25 09:32:21 +0000
commit5befa1c9751fe54b5ae87906d7f09772ce9de6ea (patch)
tree07d5b2dd1f97c88d42cc5bf723be464ec97403cd /lang/js/src/Errors.js
parentjs: change in Error behaviour (diff)
downloadgpgme-5befa1c9751fe54b5ae87906d7f09772ce9de6ea.tar.gz
gpgme-5befa1c9751fe54b5ae87906d7f09772ce9de6ea.zip
js: reactivate timeout on connection
-- * A timeout of 5 seconds is activated for functions that do not require a pinentry. This definition is written to src/permittedOperations.js * testapplication.js now alerts the proper error codes and messages. * src/Errors.js fixed two typos in error handling
Diffstat (limited to 'lang/js/src/Errors.js')
-rw-r--r--lang/js/src/Errors.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lang/js/src/Errors.js b/lang/js/src/Errors.js
index c49bfe21..04b13e10 100644
--- a/lang/js/src/Errors.js
+++ b/lang/js/src/Errors.js
@@ -104,12 +104,12 @@ export function GPGMEJS_Error(code = 'GENERIC_ERROR'){
if (errors.hasOwnProperty(code)){
code = 'GENERIC_ERROR';
}
- if (error.type === 'error'){
+ if (errors.type === 'error'){
return {code: 'code',
msg: errors[code].msg
};
}
- if (error.type === 'warning'){
+ if (errors.type === 'warning'){
console.log(code + ': ' + error[code].msg);
}
return undefined;