masque/masque/error.py

18 lines
457 B
Python
Raw Normal View History

2016-03-15 19:12:39 -07:00
class PatternError(Exception):
"""
Simple Exception for Pattern objects and their contents
"""
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
2019-12-12 00:38:11 -08:00
class PatternLockedError(PatternError):
"""
Exception raised when trying to modify a locked pattern
"""
def __init__(self):
PatternError.__init__(self, 'Tried to modify a locked Pattern, subpattern, or shape')