class
AI::Provider::InvalidArgumentError
- AI::Provider::InvalidArgumentError
- AI::Provider::AISDKError
- Exception
- Reference
- Object
Overview
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.
Defined in:
ai/provider/errors/invalid_argument_error.crConstructors
-
.new(*, argument : String, message : String, cause : Exception | Nil = nil)
Creates a new InvalidArgumentError.
Class Method Summary
-
.instance?(error) : Bool
Checks if the given value is an instance of InvalidArgumentError.
Instance Method Summary
-
#argument : String
The name of the invalid argument.
Instance methods inherited from class AI::Provider::AISDKError
name : String
name,
to_s(io : IO) : Nil
to_s
Constructor methods inherited from class AI::Provider::AISDKError
new(*, name : String, message : String, cause : Exception | Nil = nil)
new
Class methods inherited from class AI::Provider::AISDKError
instance?(error) : Bool
instance?
Constructor Detail
def self.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
Class Method Detail
def self.instance?(error) : Bool
#
Checks if the given value is an instance of InvalidArgumentError.