NoUniquePodDefinitionException class
Exception thrown when multiple pod definitions are found for a given type in the application context.
This exception typically occurs when trying to retrieve a pod by its type from the application context, but multiple matching pod definitions are found, making it ambiguous which pod to use.
Example
throw NoUniquePodDefinitionException('Multiple pod definitions found for type MyService');
- Inheritance
-
- Object
- NestedRuntimeException
- PodException
- NoSuchPodDefinitionException
- NoUniquePodDefinitionException
- Available extensions
Constructors
- NoUniquePodDefinitionException.byTypeWithCount(Class type, int numberOfPodsFound, String message)
- Create a new NoUniquePodDefinitionException with a type and count of pods.
-
NoUniquePodDefinitionException.byTypeWithNames(Class type, List<
String> podNamesFound) - Create a new NoUniquePodDefinitionException with a type and pod names.
-
NoUniquePodDefinitionException.byTypeWithNamesAndMessage(Class type, List<
String> podNamesFound, String message) - Create a new NoUniquePodDefinitionException with a type, pod names, and custom 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
- numberOfPodsFound → int
-
final
-
podNamesFound
→ List<
String> ? -
final
- 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
-
getNumberOfPodsFound(
) → int -
Return the number of pods found when only one matching pod was expected.
override
-
getPodName(
) → String? -
Return the name of the missing pod, if lookup by name failed.
inherited
-
getPodNamesFound(
) → List< String> ? - Return the names of all pods found when only one matching pod was expected.
-
getPodType(
) → Class? -
Return the required type of the missing pod, if lookup by type failed.
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