Skip to content

Commit 23acc3e

Browse files
author
Ghislain Fourny
committed
Make error message more verbose.
1 parent cbbae51 commit 23acc3e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/jsoniq/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def bind(self, name: str, valueToBind):
132132
elif isinstance(valueToBind, tuple):
133133
conf.setExternalVariableValue(name, self.convert(valueToBind))
134134
elif isinstance(valueToBind, list):
135-
raise ValueError("To avoid confusion, a sequence of items must be provided as a Python tuple, not as a Python list. Lists are mapped to single array items, while tuples are mapped to sequences of items. If you want to bind the variable to one array item, then you need to wrap the provided list inside a singleton tuple and try again, or you can also call bindOne() instead.")
135+
raise ValueError("To avoid confusion, a sequence of items must be provided as a Python tuple, not as a Python list. Lists are mapped to single array items, while tuples are mapped to sequences of items. If you want to interpret the list as a sequence of items (one item for each list member), then you need to change this list to a tuple by wrapping it into a tuple() call. If you want to bind the variable to one array item, then you need to wrap the provided list inside a singleton tuple and try again, or you can also call bindOne() instead.")
136136
elif(hasattr(valueToBind, "_get_object_id")):
137137
conf.setExternalVariableValue(name, valueToBind);
138138
else:

0 commit comments

Comments
 (0)