All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Static Public Attributes | List of all members
ndn::ValidationError Class Reference

A ValidationError holds an error code and an optional detailed error message. More...

#include <validation-error.hpp>

Public Member Functions

 ValidationError (int code, const std::string &info="")
 Create a new ValidationError for the given code. More...
 
int getCode () const
 Get the error code given to the constructor. More...
 
const std::string & getInfo () const
 Get the error message given to the constructor. More...
 

Static Public Attributes

static const int NO_ERROR = 0
 
static const int INVALID_SIGNATURE = 1
 
static const int NO_SIGNATURE = 2
 
static const int CANNOT_RETRIEVE_CERTIFICATE = 3
 
static const int EXPIRED_CERTIFICATE = 4
 
static const int LOOP_DETECTED = 5
 
static const int MALFORMED_CERTIFICATE = 6
 
static const int EXCEEDED_DEPTH_LIMIT = 7
 
static const int INVALID_KEY_LOCATOR = 8
 
static const int POLICY_ERROR = 9
 
static const int IMPLEMENTATION_ERROR = 255
 
static const int USER_MIN = 256
 

Detailed Description

A ValidationError holds an error code and an optional detailed error message.

Constructor & Destructor Documentation

ndn::ValidationError::ValidationError ( int  code,
const std::string &  info = "" 
)
inline

Create a new ValidationError for the given code.

Parameters
codeThe code which is one of the standard error codes such as INVALID_SIGNATURE, or a custom code if greater than or equal to USER_MIN.
info(optional) The optional error message.

Member Function Documentation

int ndn::ValidationError::getCode ( ) const
inline

Get the error code given to the constructor.

Returns
The error code which is one of the standard error codes such as INVALID_SIGNATURE, or a custom code if greater than or equal to USER_MIN.
const std::string& ndn::ValidationError::getInfo ( ) const
inline

Get the error message given to the constructor.

Returns
The error message, or "" if none.

The documentation for this class was generated from the following file: