diff --git a/js/ContentName.js b/js/ContentName.js
index 249cfbe..d0d7711 100644
--- a/js/ContentName.js
+++ b/js/ContentName.js
@@ -89,7 +89,7 @@
 ContentName.prototype.to_ccnb = function(/*XMLEncoder*/ encoder)  {
 		
 		if( this.components ==null ) 
-			throw new Exception("CANNOT ENCODE EMPTY CONTENT NAME");
+			throw new Error("CANNOT ENCODE EMPTY CONTENT NAME");
 
 		encoder.writeStartElement(this.getElementLabel());
 		var count = this.components.length;
diff --git a/js/FaceInstance.js b/js/FaceInstance.js
index 78ac5de..f19d523 100644
--- a/js/FaceInstance.js
+++ b/js/FaceInstance.js
@@ -81,7 +81,7 @@
 			
 		} else {
 			
-			throw new Exception("FaceInstance.decoder.  Invalid " + 
+			throw new Error("FaceInstance.decoder.  Invalid " + 
 					CCNProtocolDTags.tagToString(CCNProtocolDTags.IPProto) + " field: " + pI);
 			
 		}
@@ -119,8 +119,8 @@
 	encoder){
 
 	//if (!this.validate()) {
-		//throw new Exception("Cannot encode : field values missing.");
-		//throw new Exception("")
+		//throw new Error("Cannot encode : field values missing.");
+		//throw new Error("")
 	//}
 	encoder.writeStartElement(this.getElementLabel());
 	
diff --git a/js/KeyLocator.js b/js/KeyLocator.js
index 96df104..14f283c 100644
--- a/js/KeyLocator.js
+++ b/js/KeyLocator.js
@@ -46,11 +46,11 @@
 				
 				
 			} catch (e) {
-				throw new Exception("Cannot parse key: ", e);
+				throw new Error("Cannot parse key: ", e);
 			} 
 
 			if (null == this.publicKey) {
-				throw new Exception("Cannot parse key: ");
+				throw new Error("Cannot parse key: ");
 			}
 
 		} else if ( decoder.peekStartElement(CCNProtocolDTags.Certificate)) {
@@ -71,10 +71,10 @@
 				if(LOG>4) console.log('CERTIFICATE FOUND: '+ this.certificate);
 				
 			} catch ( e) {
-				throw new Exception("Cannot decode certificate: " +  e);
+				throw new Error("Cannot decode certificate: " +  e);
 			}
 			if (null == this.certificate) {
-				throw new Exception("Cannot parse certificate! ");
+				throw new Error("Cannot parse certificate! ");
 			}
 		} else  {
 			this.type = 1;
@@ -108,7 +108,7 @@
 			try {
 				encoder.writeElement(CCNProtocolDTags.Certificate, this.certificate);
 			} catch ( e) {
-				throw new Exception("CertificateEncodingException attempting to write key locator: " + e);
+				throw new Error("CertificateEncodingException attempting to write key locator: " + e);
 			}
 			
 		} else if (this.type == KeyLocatorType.NAME) {
diff --git a/js/KeyName.js b/js/KeyName.js
index e958c3f..ccbda2a 100644
--- a/js/KeyName.js
+++ b/js/KeyName.js
@@ -32,7 +32,7 @@
 
 KeyName.prototype.to_ccnb = function( encoder) {
 	if (!this.validate()) {
-		throw new Exception("Cannot encode : field values missing.");
+		throw new Error("Cannot encode : field values missing.");
 	}
 	
 	encoder.writeStartElement(this.getElementLabel());
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);
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);
diff --git a/js/Signature.js b/js/Signature.js
index 9672b3f..6b71dad 100644
--- a/js/Signature.js
+++ b/js/Signature.js
@@ -60,7 +60,7 @@
 Signature.prototype.to_ccnb= function( encoder){
     	
 	if (!this.validate()) {
-		throw new Exception("Cannot encode: field values missing.");
+		throw new Error("Cannot encode: field values missing.");
 	}
 	
 	encoder.writeStartElement(this.getElementLabel());
diff --git a/js/SignedInfo.js b/js/SignedInfo.js
index 909545a..f398c4c 100644
--- a/js/SignedInfo.js
+++ b/js/SignedInfo.js
@@ -109,7 +109,7 @@
 			
 			
 			if (null == this.type) {
-				throw new Exception("Cannot parse signedInfo type: bytes.");
+				throw new Error("Cannot parse signedInfo type: bytes.");
 			}
 			
 		} else {
@@ -135,7 +135,7 @@
 
 SignedInfo.prototype.to_ccnb = function( encoder)  {
 		if (!this.validate()) {
-			throw new Exception("Cannot encode : field values missing.");
+			throw new Error("Cannot encode : field values missing.");
 		}
 		encoder.writeStartElement(this.getElementLabel());
 		
diff --git a/js/encoding/BinaryXMLCodec.js b/js/encoding/BinaryXMLCodec.js
index b1befdd..e6b8fef 100644
--- a/js/encoding/BinaryXMLCodec.js
+++ b/js/encoding/BinaryXMLCodec.js
@@ -61,14 +61,14 @@
 	offset) {
 	
 	if ((type > XML_UDATA) || (type < 0) || (val < 0)) {
-		throw new Exception("Tag and value must be positive, and tag valid.");
+		throw new Error("Tag and value must be positive, and tag valid.");
 	}
 	
 	// Encode backwards. Calculate how many bytes we need:
 	var/*int*/ numEncodingBytes = numEncodingBytes(val);
 	
 	if ((offset + numEncodingBytes) > buf.length) {
-		throw new Exception("Buffer space of " + (buf.length-offset) + 
+		throw new Error("Buffer space of " + (buf.length-offset) + 
 											" bytes insufficient to hold " + 
 											numEncodingBytes + " of encoded type and value.");
 	}
@@ -104,7 +104,7 @@
 		offset) {
 	
 	if ((type > XML_UDATA) || (type < 0) || (val < 0)) {
-		throw new Exception("Tag and value must be positive, and tag valid.");
+		throw new Error("Tag and value must be positive, and tag valid.");
 	}
 	
 	// Encode backwards. Calculate how many bytes we need:
@@ -112,7 +112,7 @@
 	var numEncodingBytes = numEncodingBytes(val);
 	
 	if ((offset + numEncodingBytes) > buf.length) {
-		throw new Exception("Buffer space of " + (buf.length-offset) + 
+		throw new Error("Buffer space of " + (buf.length-offset) + 
 											" bytes insufficient to hold " + 
 											numEncodingBytes + " of encoded type and value.");
 	}
@@ -137,7 +137,7 @@
 		--i;
 	}
 	if (val != 0) {
-		throw new Exception( "This should not happen: miscalculated encoding");
+		throw new Error( "This should not happen: miscalculated encoding");
 		//Log.warning(Log.FAC_ENCODING, "This should not happen: miscalculated encoding length, have " + val + " left.");
 	}
 	
diff --git a/js/encoding/BinaryXMLDecoder.js b/js/encoding/BinaryXMLDecoder.js
index c41d549..41a4e45 100644
--- a/js/encoding/BinaryXMLDecoder.js
+++ b/js/encoding/BinaryXMLDecoder.js
@@ -86,7 +86,7 @@
 		tv = this.decodeTypeAndVal(this.istream);
 
 		if (null == tv) {
-			throw new Exception("Expected start element: " + startTag + " got something not a tag.");
+			throw new Error("Expected start element: " + startTag + " got something not a tag.");
 		}
 		
 		//String 
@@ -101,7 +101,7 @@
 		}
 		
 		if ((null ==  decodedTag) || decodedTag != startTag) {
-			throw new Exception("Expected start element: " + startTag + " got: " + decodedTag + "(" + tv.val() + ")");
+			throw new Error("Expected start element: " + startTag + " got: " + decodedTag + "(" + tv.val() + ")");
 		}
 		
 		if (null != attributes) {
@@ -109,7 +109,7 @@
 		}
 		
 	} catch (e) {
-		throw new Exception("readStartElement", e);
+		throw new Error("readStartElement", e);
 	}
 };
 
@@ -189,7 +189,7 @@
 			tv = this.decodeTypeAndVal(this.istream);
 			
 			if (null == tv) {
-				throw new Exception("Expected start element: " + startTag + " got something not a tag.");
+				throw new Error("Expected start element: " + startTag + " got something not a tag.");
 			}
 			
 			//String 
@@ -227,7 +227,7 @@
 			
 			if ((null ==  decodedTag) || decodedTag != startTag ) {
 				console.log('expecting '+ startag + ' but got '+ decodedTag);
-				throw new Exception("Expected start element: " + startTag + " got: " + decodedTag + "(" + tv.val() + ")");
+				throw new Error("Expected start element: " + startTag + " got: " + decodedTag + "(" + tv.val() + ")");
 			}
 			
 			// DKS: does not read attributes out of stream if caller doesn't
@@ -239,7 +239,7 @@
 			
 		//} catch ( e) {
 			//console.log(e);
-			//throw new Exception("readStartElement", e);
+			//throw new Error("readStartElement", e);
 		//}
 	}
 	
@@ -281,7 +281,7 @@
 				// DKS TODO are attributes same or different dictionary?
 				attributeName = tagToString(thisTV.val());
 				if (null == attributeName) {
-					throw new Exception("Unknown DATTR value" + thisTV.val());
+					throw new Error("Unknown DATTR value" + thisTV.val());
 				}
 			}
 			// Attribute values are always UDATA
@@ -296,7 +296,7 @@
 
 	} catch ( e) {
 		Log.logStackTrace(Log.FAC_ENCODING, Level.WARNING, e);
-		throw new Exception("readStartElement", e);
+		throw new Error("readStartElement", e);
 	}
 };
 
@@ -371,7 +371,7 @@
 		return false;
 	}
 	else{
-		throw new Exception("SHOULD BE STRING OR NUMBER");
+		throw new Error("SHOULD BE STRING OR NUMBER");
 	}
 }
 //returns Long
@@ -425,7 +425,7 @@
 				this.offset = previousOffset;
 			} catch ( e) {
 				Log.logStackTrace(Log.FAC_ENCODING, Level.WARNING, e);
-				throw new Exception("Cannot reset stream! " + e.getMessage(), e);
+				throw new Error("Cannot reset stream! " + e.getMessage(), e);
 			}
 		}
 		return decodedTag;
@@ -767,7 +767,7 @@
 
 	//}
 	//catch (e) {
-		//throw new Exception("Cannot parse " + startTag + ": " + strVal);
+		//throw new Error("Cannot parse " + startTag + ": " + strVal);
 	//}
 	
 	return parseInt(strVal);
diff --git a/js/encoding/BinaryXMLEncoder.js b/js/encoding/BinaryXMLEncoder.js
index 16759b1..7404802 100644
--- a/js/encoding/BinaryXMLEncoder.js
+++ b/js/encoding/BinaryXMLEncoder.js
@@ -207,14 +207,14 @@
 	if(LOG>4) console.log('OFFSET IS ' + this.offset );
 	
 	if ((type > XML_UDATA) || (type < 0) || (val < 0)) {
-		throw new Exception("Tag and value must be positive, and tag valid.");
+		throw new Error("Tag and value must be positive, and tag valid.");
 	}
 	
 	// Encode backwards. Calculate how many bytes we need:
 	var numEncodingBytes = this.numEncodingBytes(val);
 	
 	if ((this.offset + numEncodingBytes) > buf.length) {
-		throw new Exception("Buffer space of " + (buf.length-this.offset) + 
+		throw new Error("Buffer space of " + (buf.length-this.offset) + 
 											" bytes insufficient to hold " + 
 											numEncodingBytes + " of encoded type and value.");
 	}
@@ -239,7 +239,7 @@
 		--i;
 	}
 	if (val != 0) {
-		throw new Exception( "This should not happen: miscalculated encoding");
+		throw new Error( "This should not happen: miscalculated encoding");
 		//Log.warning(Log.FAC_ENCODING, "This should not happen: miscalculated encoding length, have " + val + " left.");
 	}
 	this.offset+= numEncodingBytes;
