While the Msg variant may be a useful option for some users, many will
prefer to stick to more descriptive error types, and won't want this
variant present. This allows a skip_msg_variant flag to be passed to
error_chain!, which will cause no Msg variant to be present in the
generated code.
I've also refactored the body of impl_error_chain_processing to not
care about the number of arguments other than the final branch, so more
cases can be added in the future without having to touch as many places
as I did.
While the
Msg
variant may be a useful option for some users, many will prefer to stick to more descriptive error types, and won't want this variant present. This allows askip_msg_variant
flag to be passed toerror_chain!
, which will cause noMsg
variant to be present in the generated code.I've also refactored the body of
impl_error_chain_processing
to not care about the number of arguments other than the final branch, so more cases can be added in the future without having to touch as many places as I did.Fixes #200.