You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bash_object.util.die 'ERROR_VOBJ_INCORRECT_TYPE'"Virtual object has a reference of type '$vmd_dtype', but when dereferencing, a variable of type '$current_object_type' was found"
bash_object.util.die 'ERROR_VOBJ_INCORRECT_TYPE'"Virtual object has a reference of type '$vmd_dtype', but when dereferencing, a variable of type '$current_object_type' was found"
171
-
return
172
-
fi
173
-
;;
174
-
array)
175
-
if [ "$current_object_type"!= array ];then
176
-
bash_object.util.die 'ERROR_VOBJ_INCORRECT_TYPE'"Virtual object has a reference of type '$vmd_dtype', but when dereferencing, a variable of type '$current_object_type' was found"
bash_object.util.die 'ERROR_VOBJ_INCORRECT_TYPE'"Virtual object has a reference of type '$vmd_dtype', but when dereferencing, a variable of type '$current_object_type' was found"
182
145
return
183
-
;;
184
-
esac
185
-
fi
186
-
187
-
# Ensure no circular references (WET)
188
-
if [ "$old_current_object_name"="$current_object_name" ];then
# Do nothing, and continue to next element in query. We already check for the
163
+
# validity of the virtual object above, so no need to do anything here
164
+
:
165
+
elif((i+1==${#REPLIES[@]}));then
193
166
# We are last element of query, return the object
194
167
if [ "$final_value_type"= object ];then
195
168
case"$vmd_dtype"in
@@ -251,11 +224,8 @@ bash_object.traverse-get() {
251
224
fi
252
225
253
226
if((i+1<${#REPLIES[@]}));then
254
-
# Means the query is one level deeper than expected. Expected
255
-
# object/array, but got string
256
-
# TODO
257
-
echo"mu '$key_value'">&3
258
-
# return 2
227
+
bash_object.util.die 'ERROR_NOT_FOUND'"The passed filter implies that '$key' accesses an object or array, but a string with a value of '$key_value' was found instead"
bash_object.util.die 'ERROR_VOBJ_INCORRECT_TYPE'"Virtual object has a reference of type '$vmd_dtype', but when dereferencing, a variable of type '$current_object_type' was found"
267
+
return
268
+
fi
269
+
;;
270
+
array)
271
+
if [ "$current_object_type"!= array ];then
272
+
bash_object.util.die 'ERROR_VOBJ_INCORRECT_TYPE'"Virtual object has a reference of type '$vmd_dtype', but when dereferencing, a variable of type '$current_object_type' was found"
# Do nothing, and continue to next element in query. We already check for the
285
+
# validity of the virtual object above, so no need to do anything here
286
+
:
287
+
elif((i+1==${#REPLIES[@]}));then
276
288
# We are last element of query, but do not set the object there is one that already exists
277
289
if [ "$final_value_type"= object ];then
278
290
case"$vmd_dtype"in
@@ -325,8 +337,7 @@ bash_object.traverse-set() {
325
337
fi
326
338
327
339
if((i+1<${#REPLIES[@]}));then
328
-
# TODO error message
329
-
bash_object.util.die 'ERROR_NOT_FOUND'"Encountered string using accessor '$key', but expected to find either an object or array, in accordance with the filter"
340
+
bash_object.util.die 'ERROR_NOT_FOUND'"The passed filter implies that '$key' accesses an object or array, but a string with a value of '$key_value' was found instead"
0 commit comments