Raise HandshakeFailure in transport

Change the exception handling flow.
Raise `SecurityUpgradeFailure` in security_multistream.
This commit is contained in:
mhchia
2019-08-21 15:12:35 +08:00
parent 80452d9589
commit 3e04480d62
6 changed files with 54 additions and 21 deletions

View File

@ -1,6 +1,8 @@
class ValidationError(Exception):
class BaseLibp2pError(Exception):
pass
class ValidationError(BaseLibp2pError):
"""
Raised when something does not pass a validation check.
"""
pass