Add parent class MasqueError and use it for traits and all other exceptions

This commit is contained in:
Jan Petykiewicz 2020-11-09 21:59:28 -08:00
commit 4308bdeb56
8 changed files with 23 additions and 21 deletions

View file

@ -5,7 +5,7 @@ import numpy # type: ignore
from numpy import pi
#from .positionable import Positionable
from ..error import PatternError
from ..error import MasqueError
from ..utils import is_scalar, rotation_matrix_2d, vector2
T = TypeVar('T', bound='Rotatable')
@ -57,7 +57,7 @@ class RotatableImpl(Rotatable, metaclass=ABCMeta):
@rotation.setter
def rotation(self, val: float):
if not is_scalar(val):
raise PatternError('Rotation must be a scalar')
raise MasqueError('Rotation must be a scalar')
self._rotation = val % (2 * pi)
'''