Skip to content

Commit

Permalink
update errors (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
wj-Mcat committed Jul 18, 2024
1 parent 3002dee commit 4a99909
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions erniebot/src/erniebot/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
class EBError(Exception):
"""Base exception class for the erniebot library."""

def __init__(self, message: Optional[Any] = None, *args, **kwargs):
if message is None:
message = str(self.__class__.__name__)
message = message
super().__init__(message, *args, **kwargs)


class ArgumentNotFoundError(EBError):
"""An argument was not found."""
Expand Down

0 comments on commit 4a99909

Please sign in to comment.