ToolException

class ToolException(val message: String, val cause: Throwable?) : Exception

Represents a recoverable, model-facing error encountered during the execution of a tool.

This exception is used to signal to the model that an error occurred during tool execution, so it should be descriptive in a way that is understandable to the model.

Parameters

message

A message describing the error encountered.

cause

The underlying cause of the error, if any.

Constructors

Link copied to clipboard
constructor(message: String, cause: Throwable?)

Creates a ToolException with a specified error message and an optional cause.

Properties

Link copied to clipboard
open override val cause: Throwable?
Link copied to clipboard
Link copied to clipboard
open override val message: String
Link copied to clipboard
Link copied to clipboard