wallaby v0.14.0 Wallaby.QueryError exception

Summary

Functions

Converts a condition into a human readable failure message

Generates failure conditions based on query conditions

Compose an error message based on the error type and query information

Generates an error message based on errors present in the query struct. If there are multiple errors in a query then we’ll only show the first one. Because of this errors always need to be in order from most specific to most generic. That way we always show the most specific error to the user

Extracts the expression from the locator

Callback implementation for c:Exception.message/1

Extracts the locator method from the locator and converts it into a human readable format

Converts the visibilty attribute into a human readable form

Functions

condition(arg1)

Specs

condition({atom, String.t}) :: String.t | nil

Converts a condition into a human readable failure message.

conditions(opts)

Specs

conditions(Keyword.t) :: [String.t]

Generates failure conditions based on query conditions.

error_message(arg1, map)

Specs

error_message(atom, %{}) :: String.t

Compose an error message based on the error type and query information

errors(query)

Specs

Generates an error message based on errors present in the query struct. If there are multiple errors in a query then we’ll only show the first one. Because of this errors always need to be in order from most specific to most generic. That way we always show the most specific error to the user.

expression(arg)

Specs

expression({any, String.t}) :: String.t

Extracts the expression from the locator.

message(exception)

Specs

message(Exception.t) :: String.t

Callback implementation for c:Exception.message/1.

method(arg1)

Specs

method({atom, any}) :: String.t

Extracts the locator method from the locator and converts it into a human readable format

visibility(opts)

Specs

visibility(Keyword.t) :: String.t

Converts the visibilty attribute into a human readable form.