Class: InputError
An error thrown when a name source input is incorrect.
A Name is a name for this utility under certain criteria (i.e., 1+ chars),
hence, a wrong input will cause this kind of error. Another common reason
may be a wrong key in a JSON name parsing mechanism.
Keep in mind that this error is different from a ValidationError.
Extends
Constructors
Constructor
new InputError(
error):InputError
Creates a new InputError with an optional error message.
The name source is by nature a string content, maybe wrapped up in a different type. This string value may be extracted to form the following output: "InputError (stringName)", "InputError (stringName): message".
Parameters
error
ErrorMessage
Returns
InputError
Overrides
Properties
cause?
optionalcause?:unknown
Inherited from
message
message:
string
Inherited from
name
name:
string
Inherited from
source
readonlysource:string|string[]
Inherited from
stack?
optionalstack?:string
Inherited from
type
readonlytype:NameErrorType
Inherited from
Accessors
hasMessage
Get Signature
get hasMessage():
boolean
Whether a message describing the failure exists.
Returns
boolean
Inherited from
sourceAsString
Get Signature
get sourceAsString():
string
The actual source input which caused the error.
Returns
string
Inherited from
Methods
toString()
toString():
string
Returns a string representation of the error.
Returns
string