Add new types of exception.
This commit is contained in:
parent
78ab7b62ff
commit
7bf2d407db
1 changed files with 15 additions and 1 deletions
|
@ -1,3 +1,17 @@
|
|||
class DownloadIncompleteError(EOFError):
|
||||
def __init__(self, chunknum):
|
||||
def __init__(self, message, chunknum):
|
||||
super().__init__(message)
|
||||
self.chunknum = chunknum
|
||||
|
||||
|
||||
class AlreadyConnectedError(ConnectionError):
|
||||
def __init__(self, address):
|
||||
self.address = address
|
||||
|
||||
|
||||
class TrackerNotConnectedError(ConnectionError):
|
||||
pass
|
||||
|
||||
|
||||
class InProgressError(Exception):
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue