Function conch_runtime::eval::error [−][src]
pub fn error<P: ?Sized, W, E: ?Sized>(
strict: bool,
param: &P,
error: Option<W>,
env: &E,
cfg: TildeExpansion
) -> Error<P::EvalResult, W::EvalFuture> where
P: ParamEval<E> + Display,
W: WordEval<E>,
Constructs future representing a Error
parameter substitution evaluation.
First, param
will be evaluated and returned as is as long as the result is
non-empty, or if the result is defined-but-empty and strict = false
.
Otherwise, error
will be evaluated using cfg
, and the result will populate
an ExpansionError::EmptyParameter
.
Note: field splitting will neither be done on the parameter, nor the error message.