#[doc(hidden)]pub fn conversion_err_parts(
prefix: &str,
param: &str,
rust_type: Option<&str>,
crate_class: &[&str],
parts: ErrParts,
arg_message: Option<String>,
) -> ErrPartsExpand description
Combine an argument-conversion error’s own parts with the wrapper’s parameter context.
- The message becomes
<prefix>: <error message>. For an argument the macro writes the prefix in R terms (#1591):'<p>' must be <expected>when it knows what the argument should be ('x' must be a single integer,'dv' must be numeric),invalid '<p>' argumentotherwise. A sidecar setter passes its own prefix. An error that words the whole argument error itself, amatch_argchoice error (#1767) or one with anargument_message(#1833), givesarg_message(crate::__mx_conversion_arg_message!), which is the message instead. - The class vector is the error’s own (empty for the built-in and
Displayarms), followed bycrate_class, the crate’sconversion_error_classfrom[package.metadata.miniextendr], minus any class the error already names. The R helper appends therust_errorlayering after both. param(the parameter’s R name) is added as the first data field,e$param, andrust_type(the Rust type as written in the signature, when given) after it,e$rust_type. Neither is added when the error’s own data already has a field of that name: the type author’s value is kept, since the framework never overwrites a field the type author chose, and R’se$namereads only the first of two same-named fields.- The call is always the wrapper’s (
ConditionCall::Inherit), whatever the error type’sRConditionData::callsays: the R-side checks (.miniextendr_arg_error) raise the same condition with the call (#1591), and an argument error must not differ by which side caught it.