Class: ValidationError

ValidationError(code, info)

new ValidationError(code, info)

A ValidationError holds an error code and an optional detailed error message. Create a new ValidationError for the given code.
Parameters:
Name Type Description
code number The code which is one of the standard error codes such as ValidationError.INVALID_SIGNATURE, or a custom code if greater than or equal to ValidationError.USER_MIN .
info string {optinal) The error message. If omitted, use an empty string.
Source:

Methods

getCode()

Get the error code given to the constructor.
Source:
Returns:
The error code which is one of the standard error codes such as ValidationError.INVALID_SIGNATURE, or a custom code if greater than or equal to ValidationError.USER_MIN.

getInfo()

Get the error message given to the constructor.
Source:
Returns:
The error message, or "" if none.

toString() → {string}

Get a string representation of this ValidationError.
Source:
Returns:
The string representation.
Type
string