Skip to content

Commit a167e1e

Browse files
committed
Add a couple new exceptions for different cases.
1 parent 8532538 commit a167e1e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

sc2reader/exceptions.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
class SC2ReaderError(Exception):
22
pass
33

4+
class NoMatchingFilesError(SC2ReaderError):
5+
pass
6+
7+
class MutipleMatchingFilesError(SC2ReaderError):
8+
pass
9+
410
class ReadError(SC2ReaderError):
511
pass
612

@@ -17,11 +23,11 @@ def __init__(self, message, replay, event, bytes):
1723
self.replay = replay
1824
self.event = event
1925
self.bytes = bytes
20-
26+
2127
def __str__(self):
2228
return """ParseError %s
2329
%s - %s
2430
%s""" % (self.message, self.event.type, self.event.code, self.bytes)
25-
31+
2632
def __repr__(self):
2733
return str(self)

0 commit comments

Comments
 (0)