23 #ifndef NDN_VALIDATION_ERROR_HPP
24 #define NDN_VALIDATION_ERROR_HPP
27 #include "../../common.hpp"
36 static const int NO_ERROR = 0;
37 static const int INVALID_SIGNATURE = 1;
38 static const int NO_SIGNATURE = 2;
39 static const int CANNOT_RETRIEVE_CERTIFICATE = 3;
40 static const int EXPIRED_CERTIFICATE = 4;
41 static const int LOOP_DETECTED = 5;
42 static const int MALFORMED_CERTIFICATE = 6;
43 static const int EXCEEDED_DEPTH_LIMIT = 7;
44 static const int INVALID_KEY_LOCATOR = 8;
45 static const int POLICY_ERROR = 9;
46 static const int IMPLEMENTATION_ERROR = 255;
48 static const int USER_MIN = 256;
57 : code_(code), info_(info)
82 operator<<(std::ostream& os,
const ValidationError& error);
ValidationError(int code, const std::string &info="")
Create a new ValidationError for the given code.
Definition: validation-error.hpp:56
int getCode() const
Get the error code given to the constructor.
Definition: validation-error.hpp:67
const std::string & getInfo() const
Get the error message given to the constructor.
Definition: validation-error.hpp:74
A ValidationError holds an error code and an optional detailed error message.
Definition: validation-error.hpp:34