Skip to content

Commit c1d1125

Browse files
committed
print ReadError now has useful output.
1 parent 5da7573 commit c1d1125

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sc2reader/exceptions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ def __init__(self, msg, type, code, location, replay=None, game_events=[], buff
1515
self.__dict__.update(locals())
1616
super(ReadError, self).__init__(msg)
1717

18+
def __str__(self):
19+
return "{0}, Type: {1}, Code: {2}".format(self.msg, self.type, self.code)
20+
1821
class ProcessError(SC2ReaderError):
1922
pass
2023

0 commit comments

Comments
 (0)