Home Manual Reference Source Repository
public class | since 0.0.1 | source

ArgumentWhitespaceStringError

Extends:

ErrorArgumentError → ArgumentWhitespaceStringError

Represents that a string argument erroneously has only whitespace characters.

Throw this Error if a parameter must have non-whitespace content.

See:

Example:

The string argument for the parameter firstName has only whitespace.
throw new ArgumentWhitespaceStringError('firstName');

Constructor Summary

Public Constructor
public

constructor(name: string, message: string)

Initializes a new instance of the ArgumentEmptyStringError class.

since 0.0.1

Public Constructors

public constructor(name: string, message: string) since 0.0.1 source

Initializes a new instance of the ArgumentEmptyStringError class.

Override:

ArgumentError#constructor

Params:

NameTypeAttributeDescription
name string
  • optional

The parameter name. Default is no name.

message string
  • optional

Specified message. Otherwise, a generic message will be used like Argument must contain non-whitespace characters. Yours has only whitespace.