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
ns3::ndn::error Namespace Reference

Namespace holding all errors from NDN.cxx API. More...

Classes

struct  Error
 Some error with error reporting engine. More...
 
struct  Exclude
 An error with Exclude. More...
 
struct  Keychain
 An error with security::Keychain. More...
 
struct  KeyLocator
 An error with KeyLocator. More...
 
struct  Name
 An error with Name. More...
 
struct  StringTransform
 
struct  Uri
 An error with URI processing. More...
 

Typedefs

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

Functions

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

Detailed Description

Namespace holding all errors from NDN.cxx API.

Typedef Documentation

typedef boost::error_info<struct tag_msg, std::string> ns3::ndn::error::msg

Free-formatted text message explaining the error.

...
catch (boost::exception &e)
{
if (const std::string *error = boost::get_error_info<error::msg> (e))
...
}
See also
get_msg

Definition at line 75 of file error.h.

typedef boost::error_info<struct tag_pos, int> ns3::ndn::error::pos

Report of the position of the error (error-specific meaning)

...
catch (boost::exception &e)
{
if (const int *error = boost::get_error_info<error::pos> (e))
...
}
See also
get_pos

Definition at line 105 of file error.h.

Function Documentation

const std::string& ns3::ndn::error::get_msg ( boost::exception &  e)
inline

Helper method to get error message from the exception.

Method assumes that message is present, if not, an exception will be thrown

Definition at line 83 of file error.h.

int ns3::ndn::error::get_pos ( boost::exception &  e)
inline

Helper method to get position of the error from the exception.

Method assumes that position is present, if not, an exception will be thrown

Definition at line 113 of file error.h.

Referenced by ns3::ndn::name::Component::fromUri().