diff options
author | Maximilian Krambach <[email protected]> | 2018-04-25 08:54:24 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-04-25 08:54:24 +0000 |
commit | c72adc00965fe4fcedd9d18609211021a091b28b (patch) | |
tree | af1cc5df7da410f42f2762da9b03b5ca3d39087d /lang/js/src/index.js | |
parent | js: allow openpgp-like Message objects as Data (diff) | |
download | gpgme-c72adc00965fe4fcedd9d18609211021a091b28b.tar.gz gpgme-c72adc00965fe4fcedd9d18609211021a091b28b.zip |
js: change in Error behaviour
--
* Error objects will now return the error code if defined as error type
in src/Errors.js, or do a console.log if it is a warning. Errors from
the native gpgme-json will be marked as GNUPG_ERROR.
Diffstat (limited to 'lang/js/src/index.js')
-rw-r--r-- | lang/js/src/index.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lang/js/src/index.js b/lang/js/src/index.js index 0cb2301c..a54277c2 100644 --- a/lang/js/src/index.js +++ b/lang/js/src/index.js @@ -19,6 +19,7 @@ */ import { GpgME } from "./gpgmejs"; +import { GPGMEJS_Error } from "./Errors"; import { GpgME_openpgpmode } from "./gpgmejs_openpgpjs"; import { Connection } from "./Connection"; @@ -45,7 +46,7 @@ function init( config = { resolve(new GpgME(connection)); } } else { - reject('NO_CONNECT'); + reject(GPGMEJS_Error('CONN_NO_CONNECT')); } }; setTimeout(delayedreaction, 5); |