[git] GPGME - branch, master, updated. gpgme-1.11.1-228-g94a0ed3

[email protected] (by Maximilian Krambach)
Newsgroups gmane.comp.encryption.gpg.cvs
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  94a0ed361ea04c2a0a2e144877b0e17b9fea35a2 (commit)
      from  59ed27bae14da6c1ba6848b34acfc836846a27bc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 94a0ed361ea04c2a0a2e144877b0e17b9fea35a2
Author: Maximilian Krambach <[email protected]>
Date:   Wed Aug 22 14:49:11 2018 +0200

    js: Return error if signature has no fingerprint
    
    --
    
    * src/Signature.js/get fingerprint: A signature with no fingerprint
      should not happen, but if it does, we should throw an error here,
      as the method is a getter.

diff --git a/lang/js/src/Signature.js b/lang/js/src/Signature.js
index a653904..530590f 100644
--- a/lang/js/src/Signature.js
+++ b/lang/js/src/Signature.js
@@ -87,9 +87,12 @@ class GPGME_Signature {
     constructor (sigObject){
         this._rawSigObject = sigObject;
     }
+    /**
+     * @returns {String} the fingerprint of this signature
+     */
     get fingerprint (){
         if (!this._rawSigObject.fingerprint){
-            return gpgme_error('SIG_WRONG');
+            throw gpgme_error('SIG_WRONG');
         } else {
             return this._rawSigObject.fingerprint;
         }

-----------------------------------------------------------------------

Summary of changes:
 lang/js/src/Signature.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.