PodProviderNotInitializedException class
Exception thrown when attempting to use a PodProvider that hasn't been fully initialized.
Factory pods go through an initialization process before they can produce other pods. This exception occurs when code tries to access the factory pod's product before the factory itself is ready.
Example:
class MyPodProvider implements PodProvider<MyService> {
bool _initialized = false;
@override
MyService getObject() {
if (!_initialized) {
throw PodProviderNotInitializedException();
}
return MyService();
}
}
// Usage
try {
final service = factoryPod.getObject();
} catch (e) {
if (e is PodProviderNotInitializedException) {
print('Factory pod not ready yet');
}
}
- Inheritance
-
- Object
- PodException
- FatalPodException
- PodProviderNotInitializedException
- Implemented types
Constructors
- PodProviderNotInitializedException()
- Create a new PodProviderNotInitializedException with the default message.
- PodProviderNotInitializedException.withMessage(String msg)
- Create a new PodProviderNotInitializedException with the given message.
Properties
- cause → Throwable?
-
The underlying cause of this exception, if any.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String?
-
The descriptive message for this exception.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace?
-
The stack trace at the point where this error was first thrown.
no setterinherited
Methods
-
contains(
Class? exType) → bool -
Checks if this exception or any exception in its cause chain is of the specified type.
inherited
-
getCause(
) → Throwable? -
The cause of this exception, if any.
inherited
-
getMessage(
) → String -
The message associated with this exception.
inherited
-
getMostSpecificCause(
) → Throwable -
Returns the most specific cause of this exception.
inherited
-
getRootCause(
) → Throwable? -
Returns the root cause of this exception by traversing the cause chain.
inherited
-
getStackTrace(
) → StackTrace -
The stack trace associated with this exception.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited