diff options
Diffstat (limited to 'lang/js/src/Errors.js')
| -rw-r--r-- | lang/js/src/Errors.js | 12 | 
1 files changed, 10 insertions, 2 deletions
| diff --git a/lang/js/src/Errors.js b/lang/js/src/Errors.js index bf52cce7..6189414f 100644 --- a/lang/js/src/Errors.js +++ b/lang/js/src/Errors.js @@ -35,6 +35,14 @@ export const err_list = {          msg: 'The nativeMessaging answer was empty.',          type: 'error'      }, +    'CONN_NO_CONFIG':{ +        msg: 'The browser does not recognize the nativeMessaging host.', +        type: 'error' +    }, +    'CONN_NATIVEMESSAGE':{ +        msg: 'The native messaging was not successful.', +        type: 'error' +    },      'CONN_TIMEOUT': {          msg: 'A connection timeout was exceeded.',          type: 'error' @@ -156,8 +164,8 @@ export function gpgme_error (code = 'GENERIC_ERROR', info){   */  class GPGME_Error extends Error{      constructor (code = 'GENERIC_ERROR', msg=''){ - -        if (code === 'GNUPG_ERROR' && typeof (msg) === 'string'){ +        const verboseErrors = ['GNUPG_ERROR', 'CONN_NATIVEMESSAGE']; +        if (verboseErrors.includes(code) && typeof (msg) === 'string'){              super(msg);          } else if (err_list.hasOwnProperty(code)){              if (msg){ | 
