aboutsummaryrefslogtreecommitdiff
path: root/src/errors/injectable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/errors/injectable.rs')
-rw-r--r--src/errors/injectable.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/errors/injectable.rs b/src/errors/injectable.rs
index 4b9af96..ed161cb 100644
--- a/src/errors/injectable.rs
+++ b/src/errors/injectable.rs
@@ -3,7 +3,7 @@
//!
//! [`Injectable`]: crate::interfaces::injectable::Injectable
-use super::di_container::DIContainerError;
+use crate::errors::di_container::DIContainerError;
/// Error type for structs that implement [`Injectable`].
///
@@ -23,6 +23,18 @@ pub enum InjectableError
affected: &'static str,
},
+ /// Failed to resolve dependencies.
+ #[cfg(feature = "async")]
+ #[error("Failed to resolve a dependency of '{affected}'")]
+ AsyncResolveFailed
+ {
+ /// The reason for the problem.
+ #[source]
+ reason: Box<crate::errors::async_di_container::AsyncDIContainerError>,
+
+ /// The affected injectable type.
+ affected: &'static str,
+ },
/// Detected circular dependencies.
#[error("Detected circular dependencies. {dependency_trace}")]
DetectedCircular