aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src/Errors.js
diff options
context:
space:
mode:
Diffstat (limited to 'lang/js/src/Errors.js')
-rw-r--r--lang/js/src/Errors.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lang/js/src/Errors.js b/lang/js/src/Errors.js
index 3b53eeb4..2f2bfd5c 100644
--- a/lang/js/src/Errors.js
+++ b/lang/js/src/Errors.js
@@ -74,7 +74,7 @@ const err_list = {
'KEY_NO_INIT': {
msg:'This property has not been retrieved yet from GPG',
type: 'error'
- }
+ },
// generic
'PARAM_WRONG':{
msg: 'Invalid parameter was found',
@@ -118,7 +118,11 @@ class GPGME_Error extends Error{
if (code === 'GNUPG_ERROR' && typeof(msg) === 'string'){
super(msg);
} else if (err_list.hasOwnProperty(code)){
- super(err_list[code].msg);
+ if (msg){
+ super(err_list[code].msg + "--" + msg);
+ } else {
+ super(err_list[code].msg);
+ }
} else {
super(err_list['GENERIC_ERROR'].msg);
}