Error representing a failed rule evaluation.
Summary
Functions
Returns a new EvaluationError struct.
Collects the error results with Spek.collect_results/2 and puts them into
the given EvaluationError struct.
Returns a new EvaluationError struct that contains the given expression.
Types
@type t() :: %Spek.EvaluationError{ __exception__: term(), expression: Spek.expression() | nil, message: String.t(), results: [term()] | nil }
Struct returned or raised if an authorization check fails.
expression contains the parts of the policy expression that were performed
and their results. Depending on the evaluation function used, this may be the
complete expression, or only the parts of it that were evaluated until a
decision was made.
results contains the collected error reasons as returned by
Spek.collect_results/2.
Functions
Returns a new EvaluationError struct.
Collects the error results with Spek.collect_results/2 and puts them into
the given EvaluationError struct.
@spec with_expression(String.t(), Spek.expression()) :: t()
Returns a new EvaluationError struct that contains the given expression.