diff --git a/Makefile.am b/Makefile.am
index 6717439..0ddbb32 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,6 +17,7 @@
   config.h \
   ndn-cpp/c/Interest.h \
   ndn-cpp/c/Name.h \
+  ndn-cpp/c/errors.c ndn-cpp/c/errors.h \
   ndn-cpp/c/encoding/BinaryXML.h \
   ndn-cpp/c/encoding/BinaryXMLDecoder.c ndn-cpp/c/encoding/BinaryXMLDecoder.h \
   ndn-cpp/c/encoding/BinaryXMLEncoder.c ndn-cpp/c/encoding/BinaryXMLEncoder.h \
diff --git a/ndn-cpp/c/encoding/BinaryXMLDecoder.c b/ndn-cpp/c/encoding/BinaryXMLDecoder.c
index 311b30a..025e679 100644
--- a/ndn-cpp/c/encoding/BinaryXMLDecoder.c
+++ b/ndn-cpp/c/encoding/BinaryXMLDecoder.c
@@ -30,9 +30,9 @@
  * @param value
  * @param valueLength
  * @param resultOut output the parsed integer.
- * @return 0 for success, else an error string, including if an element of value is not a decimal digit.
+ * @return 0 for success, else an error code, including if an element of value is not a decimal digit.
  */
-static char *parseUnsignedDecimalInt(unsigned char *value, unsigned int valueLength, unsigned int *resultOut)
+static ndn_Error parseUnsignedDecimalInt(unsigned char *value, unsigned int valueLength, unsigned int *resultOut)
 {
   unsigned int result = 0;
   
@@ -40,7 +40,7 @@
   for (i = 0; i < valueLength; ++i) {
     unsigned char digit = value[i];
     if (!(digit >= '0' && digit <= '9'))
-      return "parseUnsignedDecimalInt: element of value is not a decimal digit";
+      return NDN_ERROR_element_of_value_is_not_a_decimal_digit;
 
     result *= 10;
     result += (unsigned int)(digit - '0');
@@ -50,20 +50,20 @@
   return 0;
 }
 
-char *ndn_BinaryXMLDecoder_decodeTypeAndValue(struct ndn_BinaryXMLDecoder *self, unsigned int *type, unsigned int *valueOut) 
+ndn_Error ndn_BinaryXMLDecoder_decodeTypeAndValue(struct ndn_BinaryXMLDecoder *self, unsigned int *type, unsigned int *valueOut) 
 {
   unsigned int value = 0;
   int gotFirstOctet = 0;
   
 	while (1) {
     if (self->offset >= self->inputLength)
-      return "ndn_BinaryXMLDecoder_decodeTypeAndVal: read past the end of the input";
+      return NDN_ERROR_read_past_the_end_of_the_input;
     
 		unsigned int octet = unsafeReadOctet(self);
 		
     if (!gotFirstOctet) {
       if (octet == 0)
-        return "ndn_BinaryXMLDecoder_decodeTypeAndVal: the first header octet may not be zero";
+        return NDN_ERROR_the_first_header_octet_may_not_be_zero;
       
       gotFirstOctet = 1;
     }
@@ -82,49 +82,49 @@
   return 0;
 }
 
-char *ndn_BinaryXMLDecoder_readElementStartDTag(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag)
+ndn_Error ndn_BinaryXMLDecoder_readElementStartDTag(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag)
 {
-  char *error;
+  ndn_Error error;
   unsigned int type;
   unsigned int value;
   if (error = ndn_BinaryXMLDecoder_decodeTypeAndValue(self, &type, &value))
     return error;
   
   if (type != ndn_BinaryXML_DTAG)
-    return "ndn_BinaryXMLDecoder_readElementStartDTag: header type is not a DTAG";
+    return NDN_ERROR_header_type_is_not_a_DTAG;
   
   if (value != expectedTag)
-    return "ndn_BinaryXMLDecoder_readElementStartDTag: did not get the expected DTAG";
+    return NDN_ERROR_did_not_get_the_expected_DTAG;
   
   return 0;
 }
 
-char *ndn_BinaryXMLDecoder_readElementClose(struct ndn_BinaryXMLDecoder *self)
+ndn_Error ndn_BinaryXMLDecoder_readElementClose(struct ndn_BinaryXMLDecoder *self)
 {
   if (self->offset >= self->inputLength)
-    return "ndn_BinaryXMLDecoder_readElementClose: read past the end of the input";
+    return NDN_ERROR_read_past_the_end_of_the_input;
   
   if (unsafeReadOctet(self) != ndn_BinaryXML_CLOSE)
-    return "ndn_BinaryXMLDecoder_readElementStartDTag: did not get the expected element close";
+    return NDN_ERROR_did_not_get_the_expected_element_close;
   
   return 0;
 }
 
-char *ndn_BinaryXMLDecoder_peekDTag(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag, int *gotExpectedTag)
+ndn_Error ndn_BinaryXMLDecoder_peekDTag(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag, int *gotExpectedTag)
 {
   // Default to 0.
   *gotExpectedTag = 0;
 
   // First check if it is an element close (which cannot be the expected tag).  
   if (self->offset >= self->inputLength)
-    return "ndn_BinaryXMLDecoder_readElementClose: read past the end of the input";
+    return NDN_ERROR_read_past_the_end_of_the_input;
   if (unsafeGetOctet(self) == 0)
     return 0;
 
   unsigned int type;
   unsigned int value;
   unsigned int saveOffset = self->offset;
-  char *error = ndn_BinaryXMLDecoder_decodeTypeAndValue(self, &type, &value);
+  ndn_Error error = ndn_BinaryXMLDecoder_decodeTypeAndValue(self, &type, &value);
   // Restore offset.
   self->offset = saveOffset;
   
@@ -137,16 +137,16 @@
   return 0;
 }
 
-char *ndn_BinaryXMLDecoder_readBinaryDTagElement
+ndn_Error ndn_BinaryXMLDecoder_readBinaryDTagElement
   (struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag, int allowNull, unsigned char **value, unsigned int *valueLen)
 {
-  char *error;
+  ndn_Error error;
   if (error = ndn_BinaryXMLDecoder_readElementStartDTag(self, expectedTag))
     return error;
   
   if (allowNull) {
     if (self->offset >= self->inputLength)
-      return "ndn_BinaryXMLDecoder_readBinaryDTagElement: read past the end of the input";
+      return NDN_ERROR_read_past_the_end_of_the_input;
   
     if (unsafeGetOctet(self) == ndn_BinaryXML_CLOSE) {
       // The binary item is missing, and this is allowed, so read the element close and return a null value.
@@ -170,10 +170,10 @@
   return 0;
 }
 
-char *ndn_BinaryXMLDecoder_readUDataDTagElement
+ndn_Error ndn_BinaryXMLDecoder_readUDataDTagElement
   (struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag, unsigned char **value, unsigned int *valueLen)
 {
-  char *error;
+  ndn_Error error;
   if (error = ndn_BinaryXMLDecoder_readElementStartDTag(self, expectedTag))
     return error;
     
@@ -181,7 +181,7 @@
   if (error = ndn_BinaryXMLDecoder_decodeTypeAndValue(self, &itemType, valueLen))
     return error;
   if (itemType != ndn_BinaryXML_UDATA)
-    return "ndn_BinaryXMLDecoder_readUDataDTagElement: item is not UDATA";
+    return NDN_ERROR_item_is_not_UDATA;
   *value = self->input + self->offset;
   self->offset += *valueLen;
   
@@ -191,12 +191,12 @@
   return 0;
 }
 
-char *ndn_BinaryXMLDecoder_readUnsignedIntegerDTagElement
+ndn_Error ndn_BinaryXMLDecoder_readUnsignedIntegerDTagElement
   (struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag, unsigned int *value)
 {
   unsigned char *udataValue;
   unsigned int udataValueLength;
-  char *error;
+  ndn_Error error;
   if (error = ndn_BinaryXMLDecoder_readUDataDTagElement(self, expectedTag, &udataValue, &udataValueLength))
     return error;
   
@@ -206,11 +206,11 @@
   return 0;
 }
 
-char *ndn_BinaryXMLDecoder_readOptionalUnsignedIntegerDTagElement
+ndn_Error ndn_BinaryXMLDecoder_readOptionalUnsignedIntegerDTagElement
   (struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag, int *value)
 {
   int gotExpectedTag;
-  char *error;
+  ndn_Error error;
   if (error = ndn_BinaryXMLDecoder_peekDTag(self, expectedTag, &gotExpectedTag))
     return error;
     
diff --git a/ndn-cpp/c/encoding/BinaryXMLDecoder.h b/ndn-cpp/c/encoding/BinaryXMLDecoder.h
index 9c83c3b..0c1427e 100644
--- a/ndn-cpp/c/encoding/BinaryXMLDecoder.h
+++ b/ndn-cpp/c/encoding/BinaryXMLDecoder.h
@@ -6,6 +6,8 @@
 #ifndef NDN_BINARYXMLDECODER_H
 #define	NDN_BINARYXMLDECODER_H
 
+#include "../errors.h"
+
 #ifdef	__cplusplus
 extern "C" {
 #endif
@@ -28,25 +30,25 @@
  * @param self pointer to the ndn_BinaryXMLDecoder struct
  * @param type output for the header type
  * @param value output for the header value
- * @return 0 for success, else an error string for read past the end of the input or if the initial byte is zero
+ * @return 0 for success, else an error code for read past the end of the input or if the initial byte is zero
  */
-char *ndn_BinaryXMLDecoder_decodeTypeAndValue(struct ndn_BinaryXMLDecoder *self, unsigned int *type, unsigned int *value);
+ndn_Error ndn_BinaryXMLDecoder_decodeTypeAndValue(struct ndn_BinaryXMLDecoder *self, unsigned int *type, unsigned int *value);
 
 /**
  * Decode the header from self's input starting at offset, expecting the type to be DTAG and the value to be expectedTag.
  * Update offset.
  * @param self pointer to the ndn_BinaryXMLDecoder struct
  * @param expectedTag the expected value for DTAG
- * @return 0 for success, else an error string, including an error if not the expected tag
+ * @return 0 for success, else an error code, including an error if not the expected tag
  */
-char *ndn_BinaryXMLDecoder_readElementStartDTag(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag);
+ndn_Error ndn_BinaryXMLDecoder_readElementStartDTag(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag);
 
 /**
  * Read one byte from self's input starting at offset, expecting it to be the element close.
  * @param self pointer to the ndn_BinaryXMLDecoder struct
- * @return 0 for success, else an error string, including an error if not the element close
+ * @return 0 for success, else an error code, including an error if not the element close
  */
-char *ndn_BinaryXMLDecoder_readElementClose(struct ndn_BinaryXMLDecoder *self);
+ndn_Error ndn_BinaryXMLDecoder_readElementClose(struct ndn_BinaryXMLDecoder *self);
 
 /**
  * Decode the header from self's input starting at offset, and if it is a DTAG where the value is the expectedTag,
@@ -54,9 +56,9 @@
  * @param self pointer to the ndn_BinaryXMLDecoder struct
  * @param expectedTag the expected value for DTAG
  * @param gotExpectedTag output a 1 if got the expected tag, else 0
- * @return 0 for success, else an error string for read past the end of the input
+ * @return 0 for success, else an error code for read past the end of the input
  */
-char *ndn_BinaryXMLDecoder_peekDTag(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag, int *gotExpectedTag);
+ndn_Error ndn_BinaryXMLDecoder_peekDTag(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag, int *gotExpectedTag);
 
 /**
  * Decode the header from self's input starting at offset, expecting the type to be DTAG and the value to be expectedTag.
@@ -70,10 +72,10 @@
  * binary data item is absent, then return 0.
  * @param valueLen output the length of the binary data. However, if allowNull is 1 and the
  * binary data item is absent, then return 0.
- * @return 0 for success, else an error string, including an error if not the expected tag, or if allowNull is 0
+ * @return 0 for success, else an error code, including an error if not the expected tag, or if allowNull is 0
  * and the binary data is absent
  */
-char *ndn_BinaryXMLDecoder_readBinaryDTagElement
+ndn_Error ndn_BinaryXMLDecoder_readBinaryDTagElement
   (struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag, int allowNull, unsigned char **value, unsigned int *valueLen);
 
 /**
@@ -84,9 +86,9 @@
  * @param expectedTag the expected value for DTAG
  * @param value output a pointer to the binary data inside self's input buffer.
  * @param valueLen output the length of the binary data.
- * @return 0 for success, else an error string, including an error if not the expected tag, or if the item is not UDATA.
+ * @return 0 for success, else an error code, including an error if not the expected tag, or if the item is not UDATA.
  */
-char *ndn_BinaryXMLDecoder_readUDataDTagElement
+ndn_Error ndn_BinaryXMLDecoder_readUDataDTagElement
   (struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag, unsigned char **value, unsigned int *valueLen);
 
 /**
@@ -96,10 +98,10 @@
  * @param self pointer to the ndn_BinaryXMLDecoder struct
  * @param expectedTag the expected value for DTAG
  * @param value output the unsigned integer
- * @return 0 for success, else an error string, including an error if not the expected tag, or if the item is not UDATA,
+ * @return 0 for success, else an error code, including an error if not the expected tag, or if the item is not UDATA,
  * or can't parse the integer
  */
-char *ndn_BinaryXMLDecoder_readUnsignedIntegerDTagElement
+ndn_Error ndn_BinaryXMLDecoder_readUnsignedIntegerDTagElement
   (struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag, unsigned int *value);
 
 /**
@@ -108,10 +110,10 @@
  * @param self pointer to the ndn_BinaryXMLDecoder struct
  * @param expectedTag the expected value for DTAG
  * @param value output the unsigned integer cast to int, or -1 if the next element doesn't have expectedTag.
- * @return 0 for success, else an error string, including an error if the item is not UDATA,
+ * @return 0 for success, else an error code, including an error if the item is not UDATA,
  * or can't parse the integer
  */
-char *ndn_BinaryXMLDecoder_readOptionalUnsignedIntegerDTagElement
+ndn_Error ndn_BinaryXMLDecoder_readOptionalUnsignedIntegerDTagElement
   (struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag, int *value);
 
 /**
diff --git a/ndn-cpp/c/encoding/BinaryXMLEncoder.c b/ndn-cpp/c/encoding/BinaryXMLEncoder.c
index cf35741..eacd197 100644
--- a/ndn-cpp/c/encoding/BinaryXMLEncoder.c
+++ b/ndn-cpp/c/encoding/BinaryXMLEncoder.c
@@ -19,11 +19,11 @@
  * @param self pointer to the ndn_BinaryXMLEncoder struct
  * @param array the array to copy
  * @param arrayLength the length of the array
- * @return 0 for success, else an error string
+ * @return 0 for success, else an error code
  */
-static char *writeArray(struct ndn_BinaryXMLEncoder *self, unsigned char *array, unsigned int arrayLength)
+static ndn_Error writeArray(struct ndn_BinaryXMLEncoder *self, unsigned char *array, unsigned int arrayLength)
 {
-  char *error;
+  ndn_Error error;
   if (error = ndn_DynamicUCharArray_ensureLength(&self->output, self->offset + arrayLength))
     return error;
   
@@ -59,14 +59,14 @@
 	return nBytes;
 }
 
-char *ndn_BinaryXMLEncoder_encodeTypeAndValue(struct ndn_BinaryXMLEncoder *self, unsigned int type, unsigned int value)
+ndn_Error ndn_BinaryXMLEncoder_encodeTypeAndValue(struct ndn_BinaryXMLEncoder *self, unsigned int type, unsigned int value)
 {
 	if (type > ndn_BinaryXML_UDATA)
-		return "ndn_BinaryXMLEncoder_encodeTypeAndValue: type is out of range";
+		return NDN_ERROR_header_type_is_out_of_range;
   
 	// Encode backwards. Calculate how many bytes we need.
 	unsigned int nEncodingBytes = getNEncodingBytes(value);
-  char *error;
+  ndn_Error error;
   if (error = ndn_DynamicUCharArray_ensureLength(&self->output, self->offset + nEncodingBytes))
     return error;
 
@@ -86,16 +86,16 @@
 	}
 	if (value != 0)
     // This should not happen if getNEncodingBytes is correct.
-		return "ndn_BinaryXMLEncoder_encodeTypeAndValue: : miscalculated N encoding bytes";
+		return NDN_ERROR_encodeTypeAndValue_miscalculated_N_encoding_bytes;
 	
 	self->offset+= nEncodingBytes;
   
   return 0;
 }
 
-char *ndn_BinaryXMLEncoder_writeElementClose(struct ndn_BinaryXMLEncoder *self)
+ndn_Error ndn_BinaryXMLEncoder_writeElementClose(struct ndn_BinaryXMLEncoder *self)
 {
-  char *error;
+  ndn_Error error;
   if (error = ndn_DynamicUCharArray_ensureLength(&self->output, self->offset + 1))
     return error;
   
@@ -105,9 +105,9 @@
   return 0;
 }
 
-char *ndn_BinaryXMLEncoder_writeBlob(struct ndn_BinaryXMLEncoder *self, unsigned char *value, unsigned int valueLength)
+ndn_Error ndn_BinaryXMLEncoder_writeBlob(struct ndn_BinaryXMLEncoder *self, unsigned char *value, unsigned int valueLength)
 {
-  char *error;
+  ndn_Error error;
   if (error = ndn_BinaryXMLEncoder_encodeTypeAndValue(self, ndn_BinaryXML_BLOB, valueLength))
     return error;
   
@@ -117,9 +117,9 @@
   return 0;
 }
 
-char *ndn_BinaryXMLEncoder_writeBlobDTagElement(struct ndn_BinaryXMLEncoder *self, unsigned int tag, unsigned char *value, unsigned int valueLength)
+ndn_Error ndn_BinaryXMLEncoder_writeBlobDTagElement(struct ndn_BinaryXMLEncoder *self, unsigned int tag, unsigned char *value, unsigned int valueLength)
 {
-  char *error;
+  ndn_Error error;
   if (error = ndn_BinaryXMLEncoder_writeElementStartDTag(self, tag))
     return error;
   
diff --git a/ndn-cpp/c/encoding/BinaryXMLEncoder.h b/ndn-cpp/c/encoding/BinaryXMLEncoder.h
index 2805d81..eb87602 100644
--- a/ndn-cpp/c/encoding/BinaryXMLEncoder.h
+++ b/ndn-cpp/c/encoding/BinaryXMLEncoder.h
@@ -6,6 +6,7 @@
 #ifndef NDN_BINARYXMLENCODER_H
 #define	NDN_BINARYXMLENCODER_H
 
+#include "../errors.h"
 #include "../util/DynamicUCharArray.h"
 #include "BinaryXML.h"
 
@@ -42,17 +43,17 @@
  * @param self pointer to the ndn_BinaryXMLEncoder struct
  * @param type the header type
  * @param value the header value
- * @return 0 for success, else an error string
+ * @return 0 for success, else an error code
  */
-char *ndn_BinaryXMLEncoder_encodeTypeAndValue(struct ndn_BinaryXMLEncoder *self, unsigned int type, unsigned int value);
+ndn_Error ndn_BinaryXMLEncoder_encodeTypeAndValue(struct ndn_BinaryXMLEncoder *self, unsigned int type, unsigned int value);
 
 /**
  * Write an element start header using DTAG with the tag to self->output.
  * @param self pointer to the ndn_BinaryXMLEncoder struct
  * @param tag the DTAG tag
- * @return 0 for success, else an error string
+ * @return 0 for success, else an error code
  */
-static inline char *ndn_BinaryXMLEncoder_writeElementStartDTag(struct ndn_BinaryXMLEncoder *self, unsigned int tag) 
+static inline ndn_Error ndn_BinaryXMLEncoder_writeElementStartDTag(struct ndn_BinaryXMLEncoder *self, unsigned int tag) 
 {
   return ndn_BinaryXMLEncoder_encodeTypeAndValue(self, ndn_BinaryXML_DTAG, tag);
 }
@@ -60,18 +61,18 @@
 /**
  * Write an element close to self->output.
  * @param self pointer to the ndn_BinaryXMLEncoder struct
- * @return 0 for success, else an error string
+ * @return 0 for success, else an error code
  */
-char *ndn_BinaryXMLEncoder_writeElementClose(struct ndn_BinaryXMLEncoder *self);
+ndn_Error ndn_BinaryXMLEncoder_writeElementClose(struct ndn_BinaryXMLEncoder *self);
 
 /**
  * Write a BLOB header, then the bytes of the blob value to self->output.
  * @param self pointer to the ndn_BinaryXMLEncoder struct
  * @param value an array of bytes for the blob value
  * @param valueLength the length of the array
- * @return 0 for success, else an error string
+ * @return 0 for success, else an error code
  */
-char *ndn_BinaryXMLEncoder_writeBlob(struct ndn_BinaryXMLEncoder *self, unsigned char *value, unsigned int valueLength);
+ndn_Error ndn_BinaryXMLEncoder_writeBlob(struct ndn_BinaryXMLEncoder *self, unsigned char *value, unsigned int valueLength);
 
 /**
  * Write an element start header using DTAG with the tag to self->output, then the blob, then an element close.
@@ -80,9 +81,9 @@
  * @param tag the DTAG tag
  * @param value an array of bytes for the blob value
  * @param valueLength the length of the array
- * @return 0 for success, else an error string
+ * @return 0 for success, else an error code
  */
-char *ndn_BinaryXMLEncoder_writeBlobDTagElement(struct ndn_BinaryXMLEncoder *self, unsigned int tag, unsigned char *value, unsigned int valueLength);
+ndn_Error ndn_BinaryXMLEncoder_writeBlobDTagElement(struct ndn_BinaryXMLEncoder *self, unsigned int tag, unsigned char *value, unsigned int valueLength);
 
 #ifdef	__cplusplus
 }
diff --git a/ndn-cpp/c/encoding/BinaryXMLInterest.c b/ndn-cpp/c/encoding/BinaryXMLInterest.c
index a00d3be..1131428 100644
--- a/ndn-cpp/c/encoding/BinaryXMLInterest.c
+++ b/ndn-cpp/c/encoding/BinaryXMLInterest.c
@@ -8,9 +8,9 @@
 #include "BinaryXMLName.h"
 #include "BinaryXMLInterest.h"
 
-char *ndn_decodeBinaryXMLInterest(struct ndn_Interest *interest, struct ndn_BinaryXMLDecoder *decoder)
+ndn_Error ndn_decodeBinaryXMLInterest(struct ndn_Interest *interest, struct ndn_BinaryXMLDecoder *decoder)
 {
-  char *error;
+  ndn_Error error;
   if (error = ndn_BinaryXMLDecoder_readElementStartDTag(decoder, ndn_BinaryXML_DTag_Interest))
     return error;
     
diff --git a/ndn-cpp/c/encoding/BinaryXMLInterest.h b/ndn-cpp/c/encoding/BinaryXMLInterest.h
index 12de088..38917aa 100644
--- a/ndn-cpp/c/encoding/BinaryXMLInterest.h
+++ b/ndn-cpp/c/encoding/BinaryXMLInterest.h
@@ -6,15 +6,16 @@
 #ifndef NDN_BINARYXMLINTEREST_H
 #define	NDN_BINARYXMLINTEREST_H
 
+#include "../errors.h"
 #include "../Interest.h"
 
 #ifdef	__cplusplus
 extern "C" {
 #endif
 
-char *ndn_encodeBinaryXMLInterest(struct ndn_Interest *interest, struct ndn_BinaryXMLEncoder *encoder);
+ndn_Error ndn_encodeBinaryXMLInterest(struct ndn_Interest *interest, struct ndn_BinaryXMLEncoder *encoder);
 
-char *ndn_decodeBinaryXMLInterest(struct ndn_Interest *interest, struct ndn_BinaryXMLDecoder *decoder);
+ndn_Error ndn_decodeBinaryXMLInterest(struct ndn_Interest *interest, struct ndn_BinaryXMLDecoder *decoder);
 
 #ifdef	__cplusplus
 }
diff --git a/ndn-cpp/c/encoding/BinaryXMLName.c b/ndn-cpp/c/encoding/BinaryXMLName.c
index 9c2ea6a..bc32058 100644
--- a/ndn-cpp/c/encoding/BinaryXMLName.c
+++ b/ndn-cpp/c/encoding/BinaryXMLName.c
@@ -7,9 +7,9 @@
 #include "BinaryXMLDecoder.h"
 #include "BinaryXMLName.h"
 
-char *ndn_encodeBinaryXMLName(struct ndn_Name *name, struct ndn_BinaryXMLEncoder *encoder)
+ndn_Error ndn_encodeBinaryXMLName(struct ndn_Name *name, struct ndn_BinaryXMLEncoder *encoder)
 {
-  char *error;
+  ndn_Error error;
   if (error = ndn_BinaryXMLEncoder_writeElementStartDTag(encoder, ndn_BinaryXML_DTag_Name))
     return error;
   
@@ -26,9 +26,9 @@
   return 0;
 }
 
-char *ndn_decodeBinaryXMLName(struct ndn_Name *name, struct ndn_BinaryXMLDecoder *decoder)
+ndn_Error ndn_decodeBinaryXMLName(struct ndn_Name *name, struct ndn_BinaryXMLDecoder *decoder)
 {
-  char *error;
+  ndn_Error error;
   if (error = ndn_BinaryXMLDecoder_readElementStartDTag(decoder, ndn_BinaryXML_DTag_Name))
     return error;
     
@@ -48,7 +48,7 @@
     
     // Add the component to the name.
     if (name->nComponents >= name->maxComponents)
-      return "ndn_decodeBinaryXMLName: read a component past the maximum number of components allowed in the name";
+      return NDN_ERROR_read_a_component_past_the_maximum_number_of_components_allowed_in_the_name;
     ndn_NameComponent_init(name->components + name->nComponents, component, componentLen);
     ++name->nComponents;
   }
diff --git a/ndn-cpp/c/encoding/BinaryXMLName.h b/ndn-cpp/c/encoding/BinaryXMLName.h
index 764fc1e..6560f3e 100644
--- a/ndn-cpp/c/encoding/BinaryXMLName.h
+++ b/ndn-cpp/c/encoding/BinaryXMLName.h
@@ -6,6 +6,7 @@
 #ifndef NDN_BINARYXMLNAME_H
 #define	NDN_BINARYXMLNAME_H
 
+#include "../errors.h"
 #include "../Name.h"
 #include "BinaryXMLEncoder.h"
 
@@ -13,9 +14,9 @@
 extern "C" {
 #endif
 
-char *ndn_encodeBinaryXMLName(struct ndn_Name *name, struct ndn_BinaryXMLEncoder *encoder);
+ndn_Error ndn_encodeBinaryXMLName(struct ndn_Name *name, struct ndn_BinaryXMLEncoder *encoder);
 
-char *ndn_decodeBinaryXMLName(struct ndn_Name *name, struct ndn_BinaryXMLDecoder *decoder);
+ndn_Error ndn_decodeBinaryXMLName(struct ndn_Name *name, struct ndn_BinaryXMLDecoder *decoder);
 
 #ifdef	__cplusplus
 }
diff --git a/ndn-cpp/c/encoding/BinaryXMLStructureDecoder.c b/ndn-cpp/c/encoding/BinaryXMLStructureDecoder.c
index 571db24..f9d7dda 100644
--- a/ndn-cpp/c/encoding/BinaryXMLStructureDecoder.c
+++ b/ndn-cpp/c/encoding/BinaryXMLStructureDecoder.c
@@ -29,7 +29,7 @@
   self->state = ndn_BinaryXMLStructureDecoder_READ_HEADER_OR_CLOSE;    
 }
 
-char *ndn_BinaryXMLStructureDecoder_findElementEnd
+ndn_Error ndn_BinaryXMLStructureDecoder_findElementEnd
   (struct ndn_BinaryXMLStructureDecoder *self, unsigned char *input, unsigned int inputLength) 
 {
   if (self->gotElementEnd)
@@ -56,7 +56,7 @@
           return 0;
         }
         if (self->level < 0)
-          return "ndn_BinaryXMLStructureDecoder_findElementEnd: Unexpected close tag";
+          return NDN_ERROR_findElementEnd_unexpected_close_tag;
           
         // Get ready for the next header.
         startHeader(self);
@@ -68,7 +68,7 @@
         if (self->offset >= inputLength) {
           // We can't get all of the header bytes from this input. Save in headerBuffer.
           if (self->headerLength > sizeof(self->headerBuffer))
-            return "ndn_BinaryXMLStructureDecoder_findElementEnd: Can't store more header bytes than the size of headerBuffer";
+            return NDN_ERROR_cannot_store_more_header_bytes_than_the_size_of_headerBuffer;
           self->useHeaderBuffer = 1;
           unsigned int nNewBytes = self->headerLength - startingHeaderLength;
           ndn_memcpy(self->headerBuffer + startingHeaderLength, input + (self->offset - nNewBytes), nNewBytes);
@@ -87,7 +87,7 @@
       if (self->useHeaderBuffer) {
         // Copy the remaining bytes into headerBuffer.
         if (self->headerLength > sizeof(self->headerBuffer))
-          return "ndn_BinaryXMLStructureDecoder_findElementEnd: Can't store more header bytes than the size of headerBuffer";
+          return NDN_ERROR_cannot_store_more_header_bytes_than_the_size_of_headerBuffer;
         unsigned int nNewBytes = self->headerLength - startingHeaderLength;
         ndn_memcpy(self->headerBuffer + startingHeaderLength, input + (self->offset - nNewBytes), nNewBytes);
 
@@ -95,13 +95,13 @@
         struct ndn_BinaryXMLDecoder bufferDecoder;
         ndn_BinaryXMLDecoder_init(&bufferDecoder, self->headerBuffer, sizeof(self->headerBuffer));
         if (ndn_BinaryXMLDecoder_decodeTypeAndValue(&bufferDecoder, &type, &value))
-          return "ndn_BinaryXMLStructureDecoder_findElementEnd: Can't read header type and value";
+          return NDN_ERROR_findElementEnd_cannot_read_header_type_and_value;
       }
       else {
         // We didn't have to use the headerBuffer.
         ndn_BinaryXMLDecoder_seek(&decoder, self->offset - self->headerLength);
         if (ndn_BinaryXMLDecoder_decodeTypeAndValue(&decoder, &type, &value))
-          return "ndn_BinaryXMLStructureDecoder_findElementEnd: Can't read header type and value";
+          return NDN_ERROR_findElementEnd_cannot_read_header_type_and_value;
       }
         
       // Set the next state based on the type.
@@ -128,7 +128,7 @@
         self->state = ndn_BinaryXMLStructureDecoder_READ_BYTES;
       }
       else
-        return "ndn_BinaryXMLStructureDecoder_findElementEnd: Unrecognized header type";
+        return NDN_ERROR_findElementEnd_unrecognized_header_type;
     }  
     else if (self->state == ndn_BinaryXMLStructureDecoder_READ_BYTES) {
       unsigned int nRemainingBytes = inputLength - self->offset;
@@ -144,6 +144,6 @@
     }
     else
       // We don't expect this to happen.
-      return "ndn_BinaryXMLStructureDecoder_findElementEnd: Unrecognized state";
+      return NDN_ERROR_findElementEnd_unrecognized_state;
   }
 }
diff --git a/ndn-cpp/c/encoding/BinaryXMLStructureDecoder.h b/ndn-cpp/c/encoding/BinaryXMLStructureDecoder.h
index 2d91562..04ddd08 100644
--- a/ndn-cpp/c/encoding/BinaryXMLStructureDecoder.h
+++ b/ndn-cpp/c/encoding/BinaryXMLStructureDecoder.h
@@ -6,6 +6,8 @@
 #ifndef NDN_BINARYXMLSTRUCTUREDECODER_H
 #define	NDN_BINARYXMLSTRUCTUREDECODER_H
 
+#include "../errors.h"
+
 #ifdef	__cplusplus
 extern "C" {
 #endif
@@ -37,9 +39,9 @@
  * @param self pointer to the ndn_BinaryXMLStructureDecoder struct
  * @param input the input buffer. You have to pass in input each time because the buffer could be reallocated.
  * @param inputLength the number of bytes in input.
- * @return 0 for success, else an error string
+ * @return 0 for success, else an error code
  */
-char *ndn_BinaryXMLStructureDecoder_findElementEnd
+ndn_Error ndn_BinaryXMLStructureDecoder_findElementEnd
   (struct ndn_BinaryXMLStructureDecoder *self, unsigned char *input, unsigned int inputLength);
 
 #ifdef	__cplusplus
diff --git a/ndn-cpp/c/errors.c b/ndn-cpp/c/errors.c
new file mode 100644
index 0000000..5cb69f7
--- /dev/null
+++ b/ndn-cpp/c/errors.c
@@ -0,0 +1,50 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "errors.h"
+
+char *ndn_getErrorString(int error)
+{
+  switch (error) {
+  case NDN_ERROR_success:
+    return      "success"; 
+  case NDN_ERROR_element_of_value_is_not_a_decimal_digit:
+    return      "element of value is not a decimal digit";
+  case NDN_ERROR_read_past_the_end_of_the_input:
+    return      "read past the end of the input";
+  case NDN_ERROR_the_first_header_octet_may_not_be_zero:
+    return      "the first header octet may not be zero";
+  case NDN_ERROR_header_type_is_not_a_DTAG:
+    return      "header type is not a DTAG";
+  case NDN_ERROR_did_not_get_the_expected_DTAG:
+    return      "did not get the expected DTAG";
+  case NDN_ERROR_did_not_get_the_expected_element_close:
+    return      "did not get the expected element close";
+  case NDN_ERROR_item_is_not_UDATA:
+    return      "item is not UDATA";
+  case NDN_ERROR_header_type_is_out_of_range:
+    return      "header type is out of range";
+  case NDN_ERROR_encodeTypeAndValue_miscalculated_N_encoding_bytes:
+    return      "encodeTypeAndValue miscalculated N encoding bytes";
+  case NDN_ERROR_read_a_component_past_the_maximum_number_of_components_allowed_in_the_name:
+    return      "read a component past the maximum number of components allowed in the name";
+  case NDN_ERROR_findElementEnd_unexpected_close_tag:
+    return      "findElementEnd unexpected close tag";
+  case NDN_ERROR_cannot_store_more_header_bytes_than_the_size_of_headerBuffer:
+    return      "cannot store more header bytes than the size of headerBuffer";
+  case NDN_ERROR_findElementEnd_cannot_read_header_type_and_value:
+    return      "findElementEnd cannot read header type and value";
+  case NDN_ERROR_findElementEnd_unrecognized_header_type:
+    return      "findElementEnd unrecognized header type";
+  case NDN_ERROR_findElementEnd_unrecognized_state:
+    return      "findElementEnd unrecognized state";
+  case NDN_ERROR_DynamicUCharArray_realloc_function_pointer_not_supplied:
+    return      "DynamicUCharArray realloc function pointer not supplied";
+  case NDN_ERROR_DynamicUCharArray_realloc_failed:
+    return      "DynamicUCharArray realloc failed";
+  default:
+    return "unrecognized ndn_Error code";  
+  }
+}
diff --git a/ndn-cpp/c/errors.h b/ndn-cpp/c/errors.h
new file mode 100644
index 0000000..6cb6f1f
--- /dev/null
+++ b/ndn-cpp/c/errors.h
@@ -0,0 +1,46 @@
+/**
+ * Define error codes and ndn_getErrorString to convert to a string.
+ * @author, Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_ERRORS_H
+#define	NDN_ERRORS_H
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+  NDN_ERROR_success = 0,
+  NDN_ERROR_element_of_value_is_not_a_decimal_digit,
+  NDN_ERROR_read_past_the_end_of_the_input,
+  NDN_ERROR_the_first_header_octet_may_not_be_zero,
+  NDN_ERROR_header_type_is_not_a_DTAG,
+  NDN_ERROR_did_not_get_the_expected_DTAG,
+  NDN_ERROR_did_not_get_the_expected_element_close,
+  NDN_ERROR_item_is_not_UDATA,
+  NDN_ERROR_header_type_is_out_of_range,
+  NDN_ERROR_encodeTypeAndValue_miscalculated_N_encoding_bytes,
+  NDN_ERROR_read_a_component_past_the_maximum_number_of_components_allowed_in_the_name,
+  NDN_ERROR_findElementEnd_unexpected_close_tag,
+  NDN_ERROR_cannot_store_more_header_bytes_than_the_size_of_headerBuffer,
+  NDN_ERROR_findElementEnd_cannot_read_header_type_and_value,
+  NDN_ERROR_findElementEnd_unrecognized_header_type,
+  NDN_ERROR_findElementEnd_unrecognized_state,
+  NDN_ERROR_DynamicUCharArray_realloc_function_pointer_not_supplied,
+  NDN_ERROR_DynamicUCharArray_realloc_failed
+} ndn_Error;
+  
+/**
+ * Convert the error code to its string.
+ * @param error the error code
+ * @return the error string or "unrecognized ndn_Error code"
+ */
+char *ndn_getErrorString(int error);
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif
\ No newline at end of file
diff --git a/ndn-cpp/c/util/DynamicUCharArray.c b/ndn-cpp/c/util/DynamicUCharArray.c
index 30b0814..eb28072 100644
--- a/ndn-cpp/c/util/DynamicUCharArray.c
+++ b/ndn-cpp/c/util/DynamicUCharArray.c
@@ -5,10 +5,10 @@
 
 #include "DynamicUCharArray.h"
 
-char *ndn_DynamicUCharArray_reallocArray(struct ndn_DynamicUCharArray *self, unsigned int length)
+ndn_Error ndn_DynamicUCharArray_reallocArray(struct ndn_DynamicUCharArray *self, unsigned int length)
 {
   if (!self->realloc)
-    return "ndn_DynamicUCharArray_reallocArray: realloc function pointer not supplied";
+    return NDN_ERROR_DynamicUCharArray_realloc_function_pointer_not_supplied;
   
   // See if double is enough.
   unsigned int newLength = self->length * 2;
@@ -18,7 +18,7 @@
     
   unsigned char *newArray = (*self->realloc)(self->array, newLength);
   if (!newArray)
-    return "ndn_DynamicUCharArray_reallocArray: realloc failed";
+    return NDN_ERROR_DynamicUCharArray_realloc_failed;
   
   self->array = newArray;
   self->length = newLength;
diff --git a/ndn-cpp/c/util/DynamicUCharArray.h b/ndn-cpp/c/util/DynamicUCharArray.h
index 6647680..d8d0d23 100644
--- a/ndn-cpp/c/util/DynamicUCharArray.h
+++ b/ndn-cpp/c/util/DynamicUCharArray.h
@@ -6,6 +6,7 @@
 #ifndef NDN_DYNAMICUCHARARRAY_H
 #define	NDN_DYNAMICUCHARARRAY_H
 
+#include "../errors.h"
 #include "ndn_memory.h"
 
 #ifdef	__cplusplus
@@ -42,9 +43,9 @@
  * If not null, call self->realloc to reallocate self->array, and update self->length (which may be greater than length).
  * @param self pointer to the ndn_DynamicUCharArray struct
  * @param length the needed minimum size for self->length
- * @return 0 for success, else an error string if can't reallocate the array
+ * @return 0 for success, else an error code if can't reallocate the array
  */
-char *ndn_DynamicUCharArray_reallocArray(struct ndn_DynamicUCharArray *self, unsigned int length);
+ndn_Error ndn_DynamicUCharArray_reallocArray(struct ndn_DynamicUCharArray *self, unsigned int length);
 
 /**
  * Ensure that self->length is greater than or equal to length.  If it is, just return 0 for success.
@@ -52,12 +53,12 @@
  * If not null, call self->realloc to reallocate self->array, and update self->length (which may be greater than length).
  * @param self pointer to the ndn_DynamicUCharArray struct
  * @param length the needed minimum size for self->length
- * @return 0 for success, else an error string if need to reallocate the array but can't
+ * @return 0 for success, else an error code if need to reallocate the array but can't
  */
-static inline char *ndn_DynamicUCharArray_ensureLength(struct ndn_DynamicUCharArray *self, unsigned int length) 
+static inline ndn_Error ndn_DynamicUCharArray_ensureLength(struct ndn_DynamicUCharArray *self, unsigned int length) 
 {
   if (self->length >= length)
-    return 0;
+    return (ndn_Error)0;
 
   return ndn_DynamicUCharArray_reallocArray(self, length);
 }
@@ -68,12 +69,12 @@
  * @param value the buffer to copy from
  * @param valueLength the length of the value buffer
  * @param offset the offset in self->array to copy to
- * @return 0 for success, else an error string if need to reallocate the array but can't
+ * @return 0 for success, else an error code if need to reallocate the array but can't
  */
-static inline char *ndn_DynamicUCharArray_set
+static inline ndn_Error ndn_DynamicUCharArray_set
   (struct ndn_DynamicUCharArray *self, unsigned char *value, unsigned int valueLength, unsigned int offset) 
 {
-  char *error;
+  ndn_Error error;
   if (error = ndn_DynamicUCharArray_ensureLength(self, valueLength + offset))
     return error;
   ndn_memcpy(self->array + offset, value, valueLength);
diff --git a/test/test-encode-decode-interest.cpp b/test/test-encode-decode-interest.cpp
index 467584c..ead57cc 100644
--- a/test/test-encode-decode-interest.cpp
+++ b/test/test-encode-decode-interest.cpp
@@ -51,7 +51,7 @@
     cout << "Interest encoding length " << encodingLength << " vs. sizeof(Interest1) " << sizeof(Interest1) << endl;
 #endif
   } catch (exception &e) {
-    cout << "exception " << e.what() << endl;
+    cout << "exception: " << e.what() << endl;
   }
   return 0;
 }
