Add new types of exception.

This commit is contained in:
Yuxin Wang 2018-10-13 16:26:22 -04:00
parent 78ab7b62ff
commit 7bf2d407db

View file

@ -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