Major update: Fix bug: Rename "new Exception" to "new Error" througout the project.
diff --git a/js/PublisherID.js b/js/PublisherID.js
index 3558d24..e418d57 100644
--- a/js/PublisherID.js
+++ b/js/PublisherID.js
@@ -49,13 +49,13 @@
var nextTag = decoder.peekStartElementAsLong();
if (null == nextTag) {
- throw new Exception("Cannot parse publisher ID.");
+ throw new Error("Cannot parse publisher ID.");
}
this.publisherType = new PublisherType(nextTag);
if (!isTypeTagVal(nextTag)) {
- throw new Exception("Invalid publisher ID, got unexpected type: " + nextTag);
+ throw new Error("Invalid publisher ID, got unexpected type: " + nextTag);
}
this.publisherID = decoder.readBinaryElement(nextTag);
if (null == this.publisherID) {
@@ -65,7 +65,7 @@
PublisherID.prototype.to_ccnb = function(encoder) {
if (!this.validate()) {
- throw new Exception("Cannot encode " + this.getClass().getName() + ": field values missing.");
+ throw new Error("Cannot encode " + this.getClass().getName() + ": field values missing.");
}
encoder.writeElement(this.getElementLabel(), this.publisherID);