Handling exceptions appropriately

This commit is contained in:
Donaldson 2019-08-02 18:26:43 -05:00 committed by John Donaldson
parent f650f20aa7
commit 24f2b6cd67
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ class PuzzleSuccess(dict):
if attr in self.valid_fields:
self[attr] = value
else:
raise AttributeError()
raise AttributeError("'%s' object has no attribute '%s'" % (type(self).__name__, attr))
class Puzzle: