8000 better error message · suddrey-qut/spatialmath-python@2669d33 · GitHub
[go: up one dir, main page]

Skip to content < 8000 react-partial partial-name="keyboard-shortcuts-dialog" data-ssr="false" data-attempted-ssr="false" data-react-profiling="false" >

Commit 2669d33

Browse files
committed
better error message
1 parent ddf3471 commit 2669d33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spatialmath/base/argcheck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def getvector(v, dim=None, out='array'):
4949
s = v.shape
5050
if dim is not None:
5151
if not (s == (dim,) or s == (1, dim) or s == (dim, 1)):
52-
raise ValueError("incorrect vector length")
52+
raise ValueError("incorrect vector length: expected {}, got {}".format(dim, s))
5353

5454
v = v.flatten()
5555

0 commit comments

Comments
 (0)
0