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

ArgumentFalseError

Extends:

ErrorArgumentErrorArgumentFalsyError → ArgumentFalseError

Represents that an argument erroneously has a value of false.

Throw this Error if a parameter must be true.

See:

Example:

The argument for the parameter isValid is `false`.
throw new ArgumentFalseError('lastName');

Constructor Summary

Public Constructor
public

constructor(name: string, message: string)

Initializes a new instance of the ArgumentFalseError 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 ArgumentFalseError 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 have a truthy value. Yours is 'false'.