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
- NestedRuntimeException
- PodException
- FatalPodException
- PodProviderNotInitializedException
- Available extensions
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
-
printStackTrace(
[bool useErrorPrint = false]) → void -
Available on Error, provided by the ErrorExtensions extension
Prints the error along with its stack trace. -
printStackTrace(
[StackTrace? stacktrace, bool useErrorPrint = false]) → void -
Available on Exception, provided by the ExceptionExtensions extension
Prints the exception and optional StackTrace if available. -
printStackTrace(
[bool useErrorPrint = false]) → void -
Available on Throwable, provided by the ThrowableExtensions extension
Extension on Throwable to support printing stack traces in a unified way. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited