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
Symptom
Executing (query driver []) results in a clojure.lang.ArityException with a message that says Wrong number of args (1) passed to: etaoin.api/query.
Reproduction
See above.
Actual behavior
The exception and error message are misleading because they point to a mismatch between the arguments provided and the arity of the function. The error says that only one argument has been provided, when the user plainly sees two.
Expected behavior
The real error is that the vector argument (the query, q) is empty. The error message should reflect that.
Diagnosis
When query detects that q is a vector, is recursively calls (apply query driver q) to turn the vector into a variable number of arguments. When Clojure sees that q is empty, it tries to call (query driver), with arity of 1, which query doesn't support. The code should test whether q is an empty vector and throw an exception if so.
Action
I'll submit a PR.
The text was updated successfully, but these errors were encountered:
Version
1.1.42
Platform
All
Symptom
Executing
(query driver [])
results in aclojure.lang.ArityException
with a message that saysWrong number of args (1) passed to: etaoin.api/query
.Reproduction
See above.
Actual behavior
The exception and error message are misleading because they point to a mismatch between the arguments provided and the arity of the function. The error says that only one argument has been provided, when the user plainly sees two.
Expected behavior
The real error is that the vector argument (the query,
q
) is empty. The error message should reflect that.Diagnosis
When
query
detects thatq
is a vector, is recursively calls(apply query driver q)
to turn the vector into a variable number of arguments. When Clojure sees thatq
is empty, it tries to call(query driver)
, with arity of 1, whichquery
doesn't support. The code should test whetherq
is an empty vector and throw an exception if so.Action
I'll submit a PR.
The text was updated successfully, but these errors were encountered: