TokenLimitReachedException::__construct( string $message = '', int|null $maxTokens = null, Throwable|null $previous = null )

In this article

Creates a new TokenLimitReachedException.

Parameters

$messagestringoptional
The exception message.

Default:''

$maxTokensint|nulloptional
The token limit that was reached, if known.

Default:null

$previousThrowable|nulloptional
The previous throwable used for exception chaining.

Default:null

Source

public function __construct(string $message = '', ?int $maxTokens = null, ?\Throwable $previous = null)
{
    parent::__construct($message, 0, $previous);
    $this->maxTokens = $maxTokens;
}

Changelog

VersionDescription
1.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.