pub enum GentError {
Show 22 variants
SyntaxError {
message: String,
span: Span,
},
UnexpectedToken {
expected: String,
found: String,
span: Span,
},
UndefinedAgent {
name: String,
span: Span,
},
MissingAgentField {
agent: String,
field: String,
span: Span,
},
TypeError {
expected: String,
got: String,
span: Span,
},
LLMError {
message: String,
},
FileReadError {
path: String,
source: Error,
},
ApiError {
message: String,
},
MissingApiKey {
provider: String,
},
MaxStepsExceeded {
limit: u32,
},
ParallelTimeout {
name: String,
timeout_ms: u64,
},
UnknownTool {
name: String,
span: Span,
},
ToolError {
tool: String,
message: String,
},
UndefinedVariable {
name: String,
span: Span,
},
UndefinedProperty {
property: String,
type_name: String,
span: Span,
},
IndexOutOfBounds {
index: i64,
length: usize,
span: Span,
},
NotIndexable {
type_name: String,
span: Span,
},
InvalidOperands {
op: String,
left: String,
right: String,
span: Span,
},
DivisionByZero {
span: Span,
},
WrongArgumentCount {
expected: usize,
got: usize,
span: Span,
},
ArgumentTypeMismatch {
param: String,
expected: String,
got: String,
span: Span,
},
OutputValidationError {
message: String,
expected: String,
got: String,
},
}Expand description
All possible errors in the GENT language
Variants§
SyntaxError
Syntax error during parsing
UnexpectedToken
Unexpected token during parsing
UndefinedAgent
Reference to undefined agent
MissingAgentField
Agent missing a required field
TypeError
Type mismatch error
LLMError
LLM communication error
FileReadError
File read error
ApiError
API request failed
MissingApiKey
Missing API key
MaxStepsExceeded
Agent exceeded maximum steps
ParallelTimeout
Parallel execution timeout
UnknownTool
Unknown tool referenced
ToolError
Tool execution failed
UndefinedVariable
Undefined variable reference
UndefinedProperty
Undefined property access
IndexOutOfBounds
Array/List index out of bounds
NotIndexable
Attempt to index a non-indexable type
InvalidOperands
Invalid operand types for binary operation
DivisionByZero
Division by zero error
WrongArgumentCount
Wrong number of arguments to function/tool
ArgumentTypeMismatch
Type mismatch for function/tool argument
OutputValidationError
Output validation failed for structured output
Implementations§
Trait Implementations§
Source§impl Error for GentError
impl Error for GentError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for GentError
impl !RefUnwindSafe for GentError
impl Send for GentError
impl Sync for GentError
impl Unpin for GentError
impl !UnwindSafe for GentError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.