2015-08-20 11:27:15 -04:00
|
|
|
class PriceDisagreementError(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class DuplicateStreamHashError(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class DownloadCanceledError(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class RequestCanceledError(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class InsufficientFundsError(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class ConnectionClosedBeforeResponseError(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2016-07-25 22:46:04 -04:00
|
|
|
class KeyFeeAboveMaxAllowed(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2015-08-20 11:27:15 -04:00
|
|
|
class UnknownNameError(Exception):
|
|
|
|
def __init__(self, name):
|
2016-11-08 11:21:33 -05:00
|
|
|
Exception.__init__(self, 'Name {} is unknown'.format(name))
|
2015-08-20 11:27:15 -04:00
|
|
|
self.name = name
|
|
|
|
|
2015-09-01 17:49:26 -04:00
|
|
|
|
2016-11-30 09:41:01 -06:00
|
|
|
class InvalidName(Exception):
|
|
|
|
def __init__(self, name, invalid_characters):
|
2016-07-28 18:48:29 -04:00
|
|
|
self.name = name
|
2016-11-30 09:41:01 -06:00
|
|
|
self.invalid_characters = invalid_characters
|
|
|
|
Exception.__init__(
|
|
|
|
self, 'URI contains invalid characters: {}'.format(','.join(invalid_characters)))
|
2016-07-28 18:48:29 -04:00
|
|
|
|
|
|
|
|
2015-09-01 17:49:26 -04:00
|
|
|
class UnknownStreamTypeError(Exception):
|
|
|
|
def __init__(self, stream_type):
|
|
|
|
self.stream_type = stream_type
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return repr(self.stream_type)
|
|
|
|
|
|
|
|
|
|
|
|
class InvalidStreamDescriptorError(Exception):
|
|
|
|
pass
|
|
|
|
|
2015-08-20 11:27:15 -04:00
|
|
|
|
|
|
|
class InvalidStreamInfoError(Exception):
|
2016-10-31 13:53:45 -04:00
|
|
|
def __init__(self, name, stream_info):
|
2016-11-04 15:09:40 -05:00
|
|
|
msg = '{} has claim with invalid stream info: {}'.format(name, stream_info)
|
2016-11-01 16:35:44 -04:00
|
|
|
Exception.__init__(self, msg)
|
2015-08-20 11:27:15 -04:00
|
|
|
self.name = name
|
2016-10-31 13:53:45 -04:00
|
|
|
self.stream_info = stream_info
|
2015-08-20 11:27:15 -04:00
|
|
|
|
|
|
|
|
|
|
|
class MisbehavingPeerError(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class InvalidDataError(MisbehavingPeerError):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class NoResponseError(MisbehavingPeerError):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class InvalidResponseError(MisbehavingPeerError):
|
2015-09-04 16:22:02 -04:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class NoSuchBlobError(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class NoSuchStreamHashError(Exception):
|
2015-09-16 16:27:46 -04:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class InvalidBlobHashError(Exception):
|
2016-09-20 16:58:30 -04:00
|
|
|
pass
|
|
|
|
|
2016-09-27 13:52:44 -04:00
|
|
|
|
2016-09-20 16:58:30 -04:00
|
|
|
class InvalidHeaderError(Exception):
|
|
|
|
pass
|
|
|
|
|
2016-10-14 18:25:37 -04:00
|
|
|
|
2016-09-20 16:58:30 -04:00
|
|
|
class InvalidAuthenticationToken(Exception):
|
2016-09-21 21:36:06 -04:00
|
|
|
pass
|
|
|
|
|
2016-10-14 18:25:37 -04:00
|
|
|
|
2016-09-27 13:52:44 -04:00
|
|
|
class NegotiationError(Exception):
|
2016-10-14 18:25:37 -04:00
|
|
|
pass
|