2019-08-27 01:03:12 +08:00
|
|
|
from libp2p.exceptions import BaseLibp2pError
|
|
|
|
|
|
|
|
|
2019-09-04 12:42:45 +08:00
|
|
|
class IOException(BaseLibp2pError):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class IncompleteReadError(IOException):
|
2019-10-24 14:41:10 +08:00
|
|
|
"""Fewer bytes were read than requested."""
|
2019-09-04 12:42:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
class MsgioException(IOException):
|
2019-08-25 04:47:56 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class MissingLengthException(MsgioException):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class MissingMessageException(MsgioException):
|
|
|
|
pass
|
2019-10-17 14:29:58 +08:00
|
|
|
|
2019-10-17 15:34:11 +08:00
|
|
|
|
2019-10-17 14:29:58 +08:00
|
|
|
class DecryptionFailedException(MsgioException):
|
|
|
|
pass
|
2020-02-20 21:48:03 +08:00
|
|
|
|
|
|
|
|
|
|
|
class MessageTooLarge(MsgioException):
|
|
|
|
pass
|