class

AI::Provider::InvalidArgumentError

Inherits AI::Provider::AISDKError < Exception < Reference < Object

Error thrown when a function argument is invalid.

This error is raised when a method receives an argument that doesn't meet the expected criteria.

Constructors

new(*, argument : String, message : String, cause : Exception | Nil = nil)

Creates a new InvalidArgumentError.

Parameters:

  • argument: The name of the invalid argument
  • message: The error message describing what's wrong
  • cause: Optional underlying exception
Source

Class methods

instance?(error) : Bool

Checks if the given value is an instance of InvalidArgumentError.

Source

Instance methods

argument

The name of the invalid argument.

Source