Skip to content

Commit

Permalink
Add minimal ErrorCodes definition (#3185)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel J. Beutel <[email protected]>
  • Loading branch information
jafermarq and danieljanes authored Apr 2, 2024
1 parent 29ac32f commit 0173567
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/py/flwr/common/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,14 @@ 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_RAISED_EXCEPTION = 1

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

0 comments on commit 0173567

Please sign in to comment.