Skip to content

omnipy.shared.exceptions

Shared exceptions used across Omnipy protocols and runtime code.

CLASS DESCRIPTION
AssumedToBeImplementedException

Used as default implementation for methods in Protocols that are to be

FailedDataError

Raised when failed data is used as resolved data.

JobStateException

Base exception for job state issues.

OmnipyNoneIsNotAllowedError

Raised when None is invalid for an Omnipy pydantic field.

PendingDataError

Raised when pending data is used as resolved data.

ShouldNotOccurException

Raised when an assumed-impossible condition occurs.

AssumedToBeImplementedException

Bases: Exception


              flowchart BT
              omnipy.shared.exceptions.AssumedToBeImplementedException[AssumedToBeImplementedException]

              

              click omnipy.shared.exceptions.AssumedToBeImplementedException href "" "omnipy.shared.exceptions.AssumedToBeImplementedException"
            

Used as default implementation for methods in Protocols that are to be inherited from in TYPE_CHECKING blocks. This tells type checkers that a class should be assumed to implement the protocol, even when type checkers cannot verify this. If a Protocol method is just an ellipsis or raises NotImplementedError, type checkers will check that the class actually implements the method.

Source code in src/omnipy/shared/exceptions.py
class AssumedToBeImplementedException(Exception):
    """
    Used as default implementation for methods in Protocols that are to be
    inherited from in TYPE_CHECKING blocks. This tells type checkers
    that a class should be assumed to implement the protocol, even when
    type checkers cannot verify this. If a Protocol method is just an
    ellipsis or raises NotImplementedError, type checkers will check that
    the class actually implements the method.
    """
    ...

FailedDataError

Bases: ValueError


              flowchart BT
              omnipy.shared.exceptions.FailedDataError[FailedDataError]

              

              click omnipy.shared.exceptions.FailedDataError href "" "omnipy.shared.exceptions.FailedDataError"
            

Raised when failed data is used as resolved data.

Source code in src/omnipy/shared/exceptions.py
class FailedDataError(ValueError):
    """Raised when failed data is used as resolved data."""

    ...

JobStateException

Bases: Exception


              flowchart BT
              omnipy.shared.exceptions.JobStateException[JobStateException]

              

              click omnipy.shared.exceptions.JobStateException href "" "omnipy.shared.exceptions.JobStateException"
            

Base exception for job state issues.

Source code in src/omnipy/shared/exceptions.py
6
7
8
9
class JobStateException(Exception):
    """Base exception for job state issues."""

    ...

OmnipyNoneIsNotAllowedError

Bases: pyd.NoneIsNotAllowedError


              flowchart BT
              omnipy.shared.exceptions.OmnipyNoneIsNotAllowedError[OmnipyNoneIsNotAllowedError]

                              omnipy.util.pydantic.NoneIsNotAllowedError --> omnipy.shared.exceptions.OmnipyNoneIsNotAllowedError
                


              click omnipy.shared.exceptions.OmnipyNoneIsNotAllowedError href "" "omnipy.shared.exceptions.OmnipyNoneIsNotAllowedError"
            

Raised when None is invalid for an Omnipy pydantic field.

ATTRIBUTE DESCRIPTION
msg_template

Source code in src/omnipy/shared/exceptions.py
class OmnipyNoneIsNotAllowedError(pyd.NoneIsNotAllowedError):
    """Raised when `None` is invalid for an Omnipy pydantic field."""

    msg_template = '[Omnipy] none is not an allowed value'

msg_template class-attribute instance-attribute

msg_template = '[Omnipy] none is not an allowed value'

PendingDataError

Bases: ValueError


              flowchart BT
              omnipy.shared.exceptions.PendingDataError[PendingDataError]

              

              click omnipy.shared.exceptions.PendingDataError href "" "omnipy.shared.exceptions.PendingDataError"
            

Raised when pending data is used as resolved data.

Source code in src/omnipy/shared/exceptions.py
class PendingDataError(ValueError):
    """Raised when pending data is used as resolved data."""

    ...

ShouldNotOccurException

Bases: Exception


              flowchart BT
              omnipy.shared.exceptions.ShouldNotOccurException[ShouldNotOccurException]

              

              click omnipy.shared.exceptions.ShouldNotOccurException href "" "omnipy.shared.exceptions.ShouldNotOccurException"
            

Raised when an assumed-impossible condition occurs.

Source code in src/omnipy/shared/exceptions.py
class ShouldNotOccurException(Exception):
    """Raised when an assumed-impossible condition occurs."""

    ...