Source code for jina.excepts
"""This modules defines all kinds of exceptions raised in Jina."""
[docs]class RuntimeFailToStart(SystemError, BaseJinaException):
"""When pod/deployment is failed to started."""
[docs]class RuntimeTerminated(KeyboardInterrupt, BaseJinaException):
"""The event loop of BasePod ends."""
[docs]class FlowTopologyError(Exception, BaseJinaException):
"""Flow exception when the topology is ambiguous."""
[docs]class FlowMissingDeploymentError(Exception, BaseJinaException):
"""Flow exception when a deployment can not be found in the flow."""
[docs]class FlowBuildLevelError(Exception, BaseJinaException):
"""Flow exception when required build level is higher than the current build level."""
[docs]class BadConfigSource(FileNotFoundError, BaseJinaException):
"""The yaml config file is bad, not loadable or not exist."""
[docs]class BadClient(Exception, BaseJinaException):
"""A wrongly defined client, can not communicate with jina server correctly."""
[docs]class BadClientCallback(BadClient, BaseJinaException):
"""Error in the callback function on the client side."""
[docs]class BadClientInput(BadClient, BaseJinaException):
"""Error in the request generator function on the client side."""
[docs]class BadRequestType(TypeError, BaseJinaException):
"""Exception when can not construct a request object from given data."""
[docs]class BadImageNameError(Exception, BaseJinaException):
"""Exception when an image name can not be found either local & remote"""
[docs]class BadYAMLVersion(Exception, BaseJinaException):
"""Exception when YAML config specifies a wrong version number."""
[docs]class NotSupportedError(Exception, BaseJinaException):
"""Exception when user accidentally using a retired argument."""
[docs]class RuntimeRunForeverEarlyError(Exception, BaseJinaException):
"""Raised when an error occurs when starting the run_forever of Runtime"""
[docs]class DockerVersionError(SystemError, BaseJinaException):
"""Raised when the docker version is incompatible"""
[docs]class NoContainerizedError(Exception, BaseJinaException):
"""Raised when trying to use non-containerized Executor in K8s or Docker Compose"""
[docs]class PortAlreadyUsed(RuntimeError, BaseJinaException):
"""Raised when to use a port which is already used"""