diff options
Diffstat (limited to 'macros/src')
-rw-r--r-- | macros/src/injectable/implementation.rs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/macros/src/injectable/implementation.rs b/macros/src/injectable/implementation.rs index e81dd2d..30132bf 100644 --- a/macros/src/injectable/implementation.rs +++ b/macros/src/injectable/implementation.rs @@ -430,10 +430,16 @@ impl<Dep: IDependency> InjectableImpl<Dep> }; Ok(quote! { - #do_method_call.map_err(|err| #resolve_failed_error { - reason: Box::new(err), - affected: self_type_name - })?.#to_ptr().unwrap() + #do_method_call + .map_err(|err| #resolve_failed_error { + reason: Box::new(err), + affected: self_type_name + })? + .#to_ptr() + .map_err(|err| InjectableError:: PrepareDependencyFailed { + reason: err, + dependency_name: #dep_interface_str + })? }) } |