You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
403 B
Python
14 lines
403 B
Python
2 months ago
|
from __future__ import annotations
|
||
|
|
||
|
|
||
|
class AgentKitPluginError(Exception):
|
||
|
"""Base class for exceptions in the agent plugin module."""
|
||
|
def __init__(self, message, code=None):
|
||
|
self.message = message
|
||
|
self.code = code
|
||
|
|
||
|
def __str__(self):
|
||
|
return f"[{self.code}] ${self.message}"
|
||
|
|
||
|
def __repr__(self):
|
||
|
return f"AgentPluginError({self.message}, {self.code})"
|