Skip to content

Commit

Permalink
basic errorcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
jafermarq committed Apr 1, 2024
1 parent 531e0e3 commit ab85130
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/py/flwr/common/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,15 @@ class SType:
def __new__(cls) -> SType:
"""Prevent instantiation."""
raise TypeError(f"{cls.__name__} cannot be instantiated.")


class ErrorCode:
"""Error codes for Message's Error."""

UNKNOWN = 0
CLIENT_APP_FAILED_TO_LOAD = 1
CLIENT_APP_RAISED_EXCEPTION = 2

def __new__(cls) -> ErrorCode:
"""Prevent instantiation."""
raise TypeError(f"{cls.__name__} cannot be instantiated.")

0 comments on commit ab85130

Please sign in to comment.