ValidationError Class¶
A ValidationError holds an error code and an optional detailed error message.
[C++]: | #include <ndn-cpp/security/v2/validation-error.hpp> Namespace:
ndn |
---|---|
[Python]: | Module: pyndn.security.v2 |
[Java]: | Package: net.named_data.jndn.security.v2 |
ValidationError.getCode Method¶
Get the error code.
[C++]: | int getCode() const;
|
---|---|
[Python]: | # Returns int
def getCode(self)
|
[JavaScript]: | // Returns number
ValidationError.prototype.getCode = function()
|
[Java]: | public final int getCode()
|
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. The codes are:
|
ValidationError.getInfo Method¶
Get the error message.
[C++]: | const std::string& getInfo() const;
|
---|---|
[Python]: | # Returns str
def getInfo(self)
|
[JavaScript]: | // Returns string
ValidationError.prototype.getInfo = function()
|
[Java]: | public final String getInfo()
|
Returns: | The error message, or “” if none. |
ValidationError.toString Method¶
Get a string representation of this ValidationError.
[C++]: | std::string toString() const;
|
---|---|
[Python]: | # Returns str
def toString(self)
|
[JavaScript]: | // Returns string
ValidationError.prototype.toString = function()
|
[Java]: | public String toString()
|
Returns: | The string representation. |