Error • Rust AI Agent SDK

Error: Main error type for PraisonAI Core

Error

Defined in the error module.

Rust AI Agent SDK

Main error type for PraisonAI Core

Fields

NameTypeDescription
Agentvariant–
relatedvariant–
errorsvariant–
errorvariantAgent-related errors
AgentvariantAgent-related errors
errorvariantAgent-related errors
0variantAgent-related errors

Methods

agent

rust
fn agent(msg: impl Into<String>) -> Self

Create an agent error

Parameters:

NameType
msgimpl Into&lt;String&gt;

tool

rust
fn tool(msg: impl Into<String>) -> Self

Create a tool error

Parameters:

NameType
msgimpl Into&lt;String&gt;

llm

rust
fn llm(msg: impl Into<String>) -> Self

Create an LLM error

Parameters:

NameType
msgimpl Into&lt;String&gt;

memory

rust
fn memory(msg: impl Into<String>) -> Self

Create a memory error

Parameters:

NameType
msgimpl Into&lt;String&gt;

workflow

rust
fn workflow(msg: impl Into<String>) -> Self

Create a workflow error

Parameters:

NameType
msgimpl Into&lt;String&gt;

config

rust
fn config(msg: impl Into<String>) -> Self

Create a config error

Parameters:

NameType
msgimpl Into&lt;String&gt;

io

rust
fn io(msg: impl Into<String>) -> Self

Create an IO error from a string message

Parameters:

NameType
msgimpl Into&lt;String&gt;

handoff

rust
fn handoff(msg: impl Into<String>) -> Self

Create a handoff error

Parameters:

NameType
msgimpl Into&lt;String&gt;

with_context

rust
fn with_context(self, context: impl Into<String>) -> Self

Add context to an error

Parameters:

NameType
contextimpl Into&lt;String&gt;

Source

View on GitHub

praisonai/src/error.rs at line 0


Related Documentation