diff --git a/ndnboost/exception/current_exception_cast.hpp b/ndnboost/exception/current_exception_cast.hpp
new file mode 100644
index 0000000..f4da16b
--- /dev/null
+++ b/ndnboost/exception/current_exception_cast.hpp
@@ -0,0 +1,43 @@
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_7E83C166200811DE885E826156D89593
+#define UUID_7E83C166200811DE885E826156D89593
+#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
+
+namespace
+ndnboost
+    {
+    template <class E>
+    inline
+    E *
+    current_exception_cast()
+        {
+        try
+            {
+            throw;
+            }
+        catch(
+        E & e )
+            {
+            return &e;
+            }
+        catch(
+        ...)
+            {
+            return 0;
+            }
+        }
+    }
+
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
+#endif
diff --git a/ndnboost/exception/detail/error_info_impl.hpp b/ndnboost/exception/detail/error_info_impl.hpp
new file mode 100644
index 0000000..9847814
--- /dev/null
+++ b/ndnboost/exception/detail/error_info_impl.hpp
@@ -0,0 +1,74 @@
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_CE6983AC753411DDA764247956D89593
+#define UUID_CE6983AC753411DDA764247956D89593
+#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
+
+#include <string>
+
+namespace
+ndnboost
+    {
+    namespace
+    exception_detail
+        {
+        class
+        error_info_base
+            {
+            public:
+
+            virtual std::string name_value_string() const = 0;
+
+            protected:
+
+            virtual
+            ~error_info_base() throw()
+                {
+                }
+            };
+        }
+
+    template <class Tag,class T>
+    class
+    error_info:
+        public exception_detail::error_info_base
+        {
+        public:
+
+        typedef T value_type;
+
+        error_info( value_type const & value );
+        ~error_info() throw();
+
+        value_type const &
+        value() const
+            {
+            return value_;
+            }
+
+        value_type &
+        value()
+            {
+            return value_;
+            }
+
+        private:
+
+        std::string name_value_string() const;
+
+        value_type value_;
+        };
+    }
+
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
+#endif
diff --git a/ndnboost/exception/detail/type_info.hpp b/ndnboost/exception/detail/type_info.hpp
new file mode 100644
index 0000000..d1c671f
--- /dev/null
+++ b/ndnboost/exception/detail/type_info.hpp
@@ -0,0 +1,83 @@
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_C3E1741C754311DDB2834CCA55D89593
+#define UUID_C3E1741C754311DDB2834CCA55D89593
+#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
+
+#include <ndnboost/detail/sp_typeinfo.hpp>
+#include <ndnboost/current_function.hpp>
+#include <ndnboost/config.hpp>
+#ifndef BOOST_NO_TYPEID
+#include <ndnboost/units/detail/utility.hpp>
+#endif
+#include <string>
+
+namespace
+ndnboost
+    {
+    template <class T>
+    inline
+    std::string
+    tag_type_name()
+        {
+#ifdef BOOST_NO_TYPEID
+        return BOOST_CURRENT_FUNCTION;
+#else
+        return units::detail::demangle(typeid(T*).name());
+#endif
+        }
+
+    template <class T>
+    inline
+    std::string
+    type_name()
+        {
+#ifdef BOOST_NO_TYPEID
+        return BOOST_CURRENT_FUNCTION;
+#else
+        return units::detail::demangle(typeid(T).name());
+#endif
+        }
+
+    namespace
+    exception_detail
+        {
+        struct
+        type_info_
+            {
+            detail::sp_typeinfo const * type_;
+
+            explicit
+            type_info_( detail::sp_typeinfo const & type ):
+                type_(&type)
+                {
+                }
+
+            friend
+            bool
+            operator<( type_info_ const & a, type_info_ const & b )
+                {
+                return 0!=(a.type_->before(*b.type_));
+                }
+            };
+        }
+    }
+
+#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::ndnboost::exception_detail::type_info_(BOOST_SP_TYPEID(T))
+
+#ifndef BOOST_NO_RTTI
+#define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::ndnboost::exception_detail::type_info_(typeid(x))
+#endif
+
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
+#endif
diff --git a/ndnboost/exception/get_error_info.hpp b/ndnboost/exception/get_error_info.hpp
new file mode 100644
index 0000000..9a798ed
--- /dev/null
+++ b/ndnboost/exception/get_error_info.hpp
@@ -0,0 +1,130 @@
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_1A590226753311DD9E4CCF6156D89593
+#define UUID_1A590226753311DD9E4CCF6156D89593
+#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
+
+#include <ndnboost/exception/exception.hpp>
+#include <ndnboost/exception/detail/error_info_impl.hpp>
+#include <ndnboost/exception/detail/type_info.hpp>
+#include <ndnboost/shared_ptr.hpp>
+
+namespace
+ndnboost
+    {
+    namespace
+    exception_detail
+        {
+        template <class ErrorInfo>
+        struct
+        get_info
+            {
+            static
+            typename ErrorInfo::value_type *
+            get( exception const & x )
+                {
+                if( exception_detail::error_info_container * c=x.data_.get() )
+                    if( shared_ptr<exception_detail::error_info_base> eib = c->get(BOOST_EXCEPTION_STATIC_TYPEID(ErrorInfo)) )
+                        {
+#ifndef BOOST_NO_RTTI
+                        BOOST_ASSERT( 0!=dynamic_cast<ErrorInfo *>(eib.get()) );
+#endif
+                        ErrorInfo * w = static_cast<ErrorInfo *>(eib.get());
+                        return &w->value();
+                        }
+                return 0;
+                }
+            };
+
+        template <>
+        struct
+        get_info<throw_function>
+            {
+            static
+            char const * *
+            get( exception const & x )
+                {
+                return x.throw_function_ ? &x.throw_function_ : 0;
+                }
+            };
+
+        template <>
+        struct
+        get_info<throw_file>
+            {
+            static
+            char const * *
+            get( exception const & x )
+                {
+                return x.throw_file_ ? &x.throw_file_ : 0;
+                }
+            };
+
+        template <>
+        struct
+        get_info<throw_line>
+            {
+            static
+            int *
+            get( exception const & x )
+                {
+                return x.throw_line_!=-1 ? &x.throw_line_ : 0;
+                }
+            };
+
+        template <class T,class R>
+        struct
+        get_error_info_return_type
+            {
+            typedef R * type;
+            };
+
+        template <class T,class R>
+        struct
+        get_error_info_return_type<T const,R>
+            {
+            typedef R const * type;
+            };
+        }
+
+#ifdef BOOST_NO_RTTI
+    template <class ErrorInfo>
+    inline
+    typename ErrorInfo::value_type const *
+    get_error_info( ndnboost::exception const & x )
+        {
+        return exception_detail::get_info<ErrorInfo>::get(x);
+        }
+    template <class ErrorInfo>
+    inline
+    typename ErrorInfo::value_type *
+    get_error_info( ndnboost::exception & x )
+        {
+        return exception_detail::get_info<ErrorInfo>::get(x);
+        }
+#else
+    template <class ErrorInfo,class E>
+    inline
+    typename exception_detail::get_error_info_return_type<E,typename ErrorInfo::value_type>::type
+    get_error_info( E & some_exception )
+        {
+        if( exception const * x = dynamic_cast<exception const *>(&some_exception) )
+            return exception_detail::get_info<ErrorInfo>::get(*x);
+        else
+            return 0;
+        }
+#endif
+    }
+
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
+#endif
