DER encoding: Implement DerNode and subclasses.
diff --git a/ndn-cpp/encoding/der/der-exception.hpp b/ndn-cpp/encoding/der/der-exception.hpp
new file mode 100644
index 0000000..1d0db2a
--- /dev/null
+++ b/ndn-cpp/encoding/der/der-exception.hpp
@@ -0,0 +1,61 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * @author: Yingdi Yu <yingdi@cs.ucla.edu>
+ * @author: Jeff Thompson <jefft0@remap.ucla.edu>
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_DER_EXCEPTION_HPP
+#define NDN_DER_EXCEPTION_HPP
+
+#include <exception>
+#include <string>
+
+namespace ndn {
+
+namespace der {
+
+class DerException : public std::exception {
+public:
+  DerException(const std::string& errorMessage) throw();
+  
+  ~DerException() throw();
+  
+  std::string Msg() { return errorMessage_; }
+  
+  virtual const char* what() const throw() { return errorMessage_.c_str(); }
+
+private:
+  const std::string errorMessage_;
+};
+
+class NegativeLengthException : public DerException
+{
+public:
+  NegativeLengthException(const std::string& errorMessage)
+  : DerException(errorMessage)
+  {}
+};
+
+class DerEncodingException : public DerException
+{
+public:
+  DerEncodingException(const std::string& errorMessage)
+  : DerException(errorMessage)
+  {}
+};
+
+class DerDecodingException : public DerException
+{
+public:
+  DerDecodingException(const std::string& errorMessage)
+  : DerException(errorMessage)
+  {}
+};
+
+} // der
+
+}
+
+#endif