py-libp2p/libp2p/io/exceptions.py
Alex Stokes 8e8318aa5c
Introduces IO abstractions apart from asyncio or those attached to IRawConnection
Also adds `msgio` utilities to mirror the Go implementation
2019-09-03 21:59:50 -07:00

24 lines
354 B
Python

from libp2p.exceptions import BaseLibp2pError
class IOException(BaseLibp2pError):
pass
class IncompleteReadError(IOException):
"""
Fewer bytes were read than requested.
"""
class MsgioException(IOException):
pass
class MissingLengthException(MsgioException):
pass
class MissingMessageException(MsgioException):
pass