"""
Defines custom exceptions for the tno.mpc.mpyc.secure_learning library.
"""
[docs]
class BaseSecureLearnError(Exception):
"""
Base class for custom exceptions in the tno.mpc.mpyc.secure_learning library
"""
[docs]
class MissingFunctionError(BaseSecureLearnError):
"""
The function has not been initialized.
"""
[docs]
class SecureLearnTypeError(BaseSecureLearnError, TypeError):
"""
Received object of unexpected type.
"""
[docs]
class SecureLearnUninitializedSolverError(BaseSecureLearnError):
"""
Solver has not been fully initialized.
"""
[docs]
class SecureLearnValueError(BaseSecureLearnError, ValueError):
"""
Received object with unexpected value.
"""
[docs]
class UnknownPenaltyError(BaseSecureLearnError):
"""
Penalty is not recognized.
"""