Skip to content

Commit dba22ab

Browse files
committed
Improve vector property error message
1 parent bbf063f commit dba22ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

properties/spatial.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ def validator(self, instance, value):
3939
try:
4040
return vmath.Vector(value)
4141
except Exception:
42-
raise ValueError('{} must be a Vector'.format(self.name))
42+
raise ValueError('{}: must be Vector with '
43+
'3 elements'.format(self.name))
4344

4445
def from_json(self, value):
4546
return vmath.Vector(*value)

0 commit comments

Comments
 (0)