Skip to content

Commit da6f1d3

Browse files
committed
Adds a basic implementation of package exceptions
Future work needs to wrap the standard exceptions in the package exceptions and figure out what other information should be attached to the exceptions for debug and reporting purposes.
1 parent 251d151 commit da6f1d3

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

sc2reader/exceptions.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
class SC2ReaderError(Exception):
2+
pass
3+
4+
class ReadError(SC2ReaderError):
5+
pass
6+
7+
class ProcessError(SC2ReaderError):
8+
pass
9+
10+
class FileError(SC2ReaderError):
11+
pass
12+
13+
114
class ParseError(Exception):
215
def __init__(self, message, replay, event, bytes):
316
self.message = message
@@ -11,4 +24,4 @@ def __str__(self):
1124
%s""" % (self.message, self.event.type, self.event.code, self.bytes)
1225

1326
def __repr__(self):
14-
return str(self)
27+
return str(self)

0 commit comments

Comments
 (0)