16a4fd33c1
- Move exceptions to exceptions.py - Raise `UpgradeFailure` in upgrader - Refine the try/catch for upgraders in swarm
19 lines
331 B
Python
19 lines
331 B
Python
from libp2p.exceptions import BaseLibp2pError
|
|
|
|
|
|
# TODO: Add `BaseLibp2pError` and `UpgradeFailure` can inherit from it?
|
|
class UpgradeFailure(BaseLibp2pError):
|
|
pass
|
|
|
|
|
|
class SecurityUpgradeFailure(UpgradeFailure):
|
|
pass
|
|
|
|
|
|
class MuxerUpgradeFailure(UpgradeFailure):
|
|
pass
|
|
|
|
|
|
class HandshakeFailure(BaseLibp2pError):
|
|
pass
|