crewai-ts
Version:
TypeScript port of crewAI for agent-based workflows
26 lines (25 loc) • 731 B
JavaScript
/**
* Agent Parser Types
* Defines types used in the agent parser with complete type safety
*/
/**
* Represents a parsing error in the agent output
* Includes detailed information for debugging and error recovery
*/
export class OutputParserException extends Error {
/** Specific error message for diagnosis */
error;
/**
* Creates a new OutputParserException
* @param error Detailed error message
*/
constructor(error) {
super(error);
this.error = error;
this.name = 'OutputParserException';
// Preserves stack trace in modern V8 engines
if (Error.captureStackTrace) {
Error.captureStackTrace(this, OutputParserException);
}
}
}