nameko.exceptions¶
Attributes¶
Exceptions¶
Attribute not found. |
|
Common base class for all non-exit exceptions. |
|
Common base class for all non-exit exceptions. |
|
在 |
|
如果远程工作者发生异常,则在调用者处引发的异常。 |
|
Common base class for all non-exit exceptions. |
|
Common base class for all non-exit exceptions. |
|
Common base class for all non-exit exceptions. |
|
Common base class for all non-exit exceptions. |
|
Common base class for all non-exit exceptions. |
|
Common base class for all non-exit exceptions. |
|
Common base class for all non-exit exceptions. |
|
从子命令中引发,以将错误报告回用户。 |
|
Unknown websocket connection id |
Functions¶
|
返回 exc_type 的点分模块路径,包括类名。 |
|
在准备将值序列化为 JSON 时进行转换。 |
|
将 self.exc 序列化为表示它的数据字典。 |
|
将 data 反序列化为异常实例。 |
|
装饰器,将 exc_type 注册为可反序列化为实例,而不是 |
Module Contents¶
- exception nameko.exceptions.ExtensionNotFound[源代码]¶
Bases:
AttributeError
Attribute not found.
Initialize self. See help(type(self)) for accurate signature.
- exception nameko.exceptions.RpcTimeout[源代码]¶
Bases:
Exception
Common base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception nameko.exceptions.ReplyQueueExpiredWithPendingReplies[源代码]¶
Bases:
Exception
Common base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception nameko.exceptions.ContainerBeingKilled[源代码]¶
Bases:
Exception
在
Container.spawn_worker()
启动kill
序列时引发。入口点应捕获此异常,并作出反应,仿佛它们一开始就不可用,例如,RPC 消费者可能应重新排队该消息。
我们需要这个,因为在执行
Container.kill()
时,Eventlet 可能会让出控制权,从而使入口点在它们自己被杀死之前有机会执行。Initialize self. See help(type(self)) for accurate signature.
- nameko.exceptions.get_module_path(exc_type)[源代码]¶
返回 exc_type 的点分模块路径,包括类名。
e.g.:
>>> get_module_path(MethodNotFound) >>> "nameko.exceptions.MethodNotFound"
- exception nameko.exceptions.RemoteError(exc_type=None, value='')[源代码]¶
Bases:
Exception
如果远程工作者发生异常,则在调用者处引发的异常。
Initialize self. See help(type(self)) for accurate signature.
- nameko.exceptions.safe_for_serialization(value)[源代码]¶
在准备将值序列化为 JSON 时进行转换。
对于字符串,映射和可迭代对象不进行操作,其条目被处理为安全;对于所有其他值,进行字符串化,如果失败则使用回退值。
- nameko.exceptions.deserialize(data)[源代码]¶
将 data 反序列化为异常实例。
如果 exc_path 值与注册为“可反序列化”的异常匹配,则返回该异常类型的实例。否则,返回一个描述发生异常的 RemoteError 实例。
- nameko.exceptions.deserialize_to_instance(exc_type)[源代码]¶
装饰器,将 exc_type 注册为可反序列化为实例,而不是
RemoteError
。参见deserialize()
。
- exception nameko.exceptions.BadRequest[源代码]¶
Bases:
Exception
Common base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception nameko.exceptions.MalformedRequest[源代码]¶
Bases:
BadRequest
Common base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception nameko.exceptions.MethodNotFound[源代码]¶
Bases:
BadRequest
Common base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception nameko.exceptions.IncorrectSignature[源代码]¶
Bases:
BadRequest
Common base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception nameko.exceptions.UnknownService(service_name)[源代码]¶
Bases:
Exception
Common base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception nameko.exceptions.UnserializableValueError(value)[源代码]¶
Bases:
Exception
Common base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception nameko.exceptions.ConfigurationError[源代码]¶
Bases:
Exception
Common base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception nameko.exceptions.CommandError[源代码]¶
Bases:
Exception
从子命令中引发,以将错误报告回用户。
Initialize self. See help(type(self)) for accurate signature.
- exception nameko.exceptions.ConnectionNotFound[源代码]¶
Bases:
BadRequest
Unknown websocket connection id
Initialize self. See help(type(self)) for accurate signature.