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

ArgumentEmptyStringError

Extends:

ErrorArgumentErrorArgumentFalsyError → ArgumentEmptyStringError

Represents that an argument erroneously has an empty string value.

Throw this Error if a parameter must be a non-empty string.

See:

Example:

The argument for the parameter lastName is an empty string.
throw new ArgumentEmptyStringError('lastName');

Constructor Summary

Public Constructor
public

constructor(name: string, message: string)

Initializes a new instance of the ArgumentEmptyStringError class.

since 0.0.1

Inherited Summary

From class ArgumentFalsyError
protected static

makeFalsyTypedMessage({string}:: *, {string}:: *): *

Builds a default error message for subclasses.

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:

ArgumentFalsyError#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 not be an empty string. Yours is empty.