exception.hpp File Reference
#include "ndn-cxx/detail/common.hpp"
#include <cerrno>
#include <boost/exception_ptr.hpp>
#include <boost/exception/exception.hpp>
#include <boost/exception/errinfo_errno.hpp>
#include <boost/exception/errinfo_nested_exception.hpp>
#include <boost/stacktrace/stacktrace.hpp>
+ Include dependency graph for exception.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 ndn
 
 ndn::exception
 

Macros

#define NDN_THROW(e)    NDN_THROW_NO_STACK(e) << ::ndn::exception::errinfo_stacktrace(::boost::stacktrace::stacktrace())
 
#define NDN_THROW_ERRNO(e)    NDN_THROW(e) << ::boost::errinfo_errno(errno)
 
#define NDN_THROW_NESTED(e)    NDN_THROW(e) << ::boost::errinfo_nested_exception(::boost::current_exception())
 
#define NDN_THROW_NO_STACK(e)
 

Typedefs

using ndn::exception::errinfo_stacktrace = boost::error_info< struct stacktrace, boost::stacktrace::stacktrace >
 

Functions

std::string ndn::exception::to_string (const errinfo_stacktrace &x)
 

Macro Definition Documentation

◆ NDN_THROW

#define NDN_THROW (   e)     NDN_THROW_NO_STACK(e) << ::ndn::exception::errinfo_stacktrace(::boost::stacktrace::stacktrace())

Definition at line 56 of file exception.hpp.

◆ NDN_THROW_ERRNO

#define NDN_THROW_ERRNO (   e)     NDN_THROW(e) << ::boost::errinfo_errno(errno)

Definition at line 62 of file exception.hpp.

◆ NDN_THROW_NESTED

#define NDN_THROW_NESTED (   e)     NDN_THROW(e) << ::boost::errinfo_nested_exception(::boost::current_exception())

Definition at line 65 of file exception.hpp.

◆ NDN_THROW_NO_STACK

#define NDN_THROW_NO_STACK (   e)
Value:
throw ::boost::enable_current_exception(::boost::enable_error_info(e)) \
<< ::boost::throw_file(__FILE__) \
<< ::boost::throw_line(__LINE__) \
<< ::boost::throw_function(__func__)

Definition at line 49 of file exception.hpp.