An error that is thrown when one of the arguments provided to a method is not valid.

Hierarchy (view full)

Constructors

Properties

Constructors

  • Initializes a new instance of the ArgumentError class.

    Parameters

    • parameter: string

      The name of the parameter corresponding to the invalid argument.

    • Optionalmessage: string

      The error message. If not specified, a default one will be used.

    Returns ArgumentError

Properties

parameter: string

The name of the method parameter corresponding to the invalid argument.