Major update: Fix bug: Rename "new Exception" to "new Error" througout the project.
diff --git a/js/PublisherPublicKeyDigest.js b/js/PublisherPublicKeyDigest.js
index 50f856c..6cae7f6 100644
--- a/js/PublisherPublicKeyDigest.js
+++ b/js/PublisherPublicKeyDigest.js
@@ -21,7 +21,7 @@
if(LOG>4)console.log('Publisher public key digest is ' + this.publisherPublicKeyDigest);
if (null == this.publisherPublicKeyDigest) {
- throw new Exception("Cannot parse publisher key digest.");
+ throw new Error("Cannot parse publisher key digest.");
}
//TODO check if the length of the PublisherPublicKeyDigest is correct ( Security reason)
@@ -38,7 +38,7 @@
PublisherPublicKeyDigest.prototype.to_ccnb= function( encoder) {
//TODO Check that the ByteArray for the key is present
if (!this.validate()) {
- throw new Exception("Cannot encode : field values missing.");
+ throw new Error("Cannot encode : field values missing.");
}
if(LOG>3) console.log('PUBLISHER KEY DIGEST IS'+this.publisherPublicKeyDigest);
encoder.writeElement(this.getElementLabel(), this.publisherPublicKeyDigest);