| 6 | |
| 7 | |
| 8 | class ClientException(AgentBenchException): |
| 9 | def __init__(self, reason: str, detail: Union[str, None] = None) -> None: |
| 10 | super().__init__() |
| 11 | self.reason = reason |
| 12 | self.detail = detail |
| 13 | |
| 14 | def __str__(self) -> str: |
| 15 | if not self.detail: |
| 16 | return "{CLASS_NAME}[{REASON}]".format( |
| 17 | CLASS_NAME=self.__class__.__name__, REASON=self.reason |
| 18 | ) |
| 19 | else: |
| 20 | return "{CLASS_NAME}[{REASON}]: {DETAIL}".format( |
| 21 | CLASS_NAME=self.__class__.__name__, |
| 22 | REASON=self.reason, |
| 23 | DETAIL=self.detail, |
| 24 | ) |
| 25 | |
| 26 | |
| 27 | class ServerException(AgentBenchException): |
nothing calls this directly
no outgoing calls
no test coverage detected