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

ArgumentUndefinedError

Extends:

ErrorArgumentErrorArgumentFalsyError → ArgumentUndefinedError

Represents that an argument erroneously is 'undefined'.

Throw this Error if a parameter must have a value.

See:

Example:

The argument for the parameter element is undefined.
throw new ArgumentUndefinedError('element');

Constructor Summary

Public Constructor
public

constructor(name: string, message: string)

Initializes a new instance of the ArgumentUndefinedError 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 ArgumentUndefinedError 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 be defined. Yours is 'undefined.