improve error generation and handling
This commit is contained in:
parent
38e9d5c250
commit
e159c80b0c
5 changed files with 10 additions and 10 deletions
|
|
@ -105,11 +105,11 @@ class Path(Shape):
|
|||
custom_caps = (PathCap.SquareCustom,)
|
||||
if self.cap in custom_caps:
|
||||
if vals is None:
|
||||
raise Exception('Tried to set cap extensions to None on path with custom cap type')
|
||||
raise PatternError('Tried to set cap extensions to None on path with custom cap type')
|
||||
self._cap_extensions = numpy.array(vals, dtype=float)
|
||||
else:
|
||||
if vals is not None:
|
||||
raise Exception('Tried to set custom cap extensions on path with non-custom cap type')
|
||||
raise PatternError('Tried to set custom cap extensions on path with non-custom cap type')
|
||||
self._cap_extensions = vals
|
||||
|
||||
# vertices property
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue