NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
error.h File Reference

This file defines basic elements for the library reporting. More...

#include "ns3/ndn-common.h"
#include <boost/exception/all.hpp>
Include dependency graph for error.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ns3::ndn::error::Error
 Some error with error reporting engine. More...
 
struct  ns3::ndn::error::Uri
 An error with URI processing. More...
 
struct  ns3::ndn::error::StringTransform
 
struct  ns3::ndn::error::Name
 An error with Name. More...
 
struct  ns3::ndn::error::name::Component
 An error with name::Component. More...
 
struct  ns3::ndn::error::Exclude
 An error with Exclude. More...
 
struct  ns3::ndn::error::KeyLocator
 An error with KeyLocator. More...
 
struct  ns3::ndn::error::wire::Ccnb
 An error with wire::Ccnb encoding. More...
 
struct  ns3::ndn::error::Keychain
 An error with security::Keychain. More...
 

Namespaces

 ns3
 NS-3 namespace.
 
 ns3::ndn
 ndnSIM namespace
 
 ns3::ndn::error
 Namespace holding all errors from NDN.cxx API.
 

Typedefs

typedef boost::error_info
< struct tag_msg, std::string > 
ns3::ndn::error::msg
 Free-formatted text message explaining the error. More...
 
typedef boost::error_info
< struct tag_pos, int > 
ns3::ndn::error::pos
 Report of the position of the error (error-specific meaning) More...
 

Functions

const std::string & ns3::ndn::error::get_msg (boost::exception &e)
 Helper method to get error message from the exception. More...
 
int ns3::ndn::error::get_pos (boost::exception &e)
 Helper method to get position of the error from the exception. More...
 

Detailed Description

This file defines basic elements for the library reporting.

The library throws a number of exceptions. In general, the following example shows how to print out diagnostic information when one of the exceptions is thrown

try
{
... operations with ndn::Name
}
catch (boost::exception &e)
{
std::cerr << boost::diagnostic_information (e) << std::endl;
}

Definition in file error.h.