ModuleConfigurationException class

Thrown when a module is incorrectly configured.

Covers cases such as:

  • Sealed public scope violations
  • Duplicate export registrations
  • Missing required providers (e.g. ModularityRoot, ModuleProvider)
  • Wrong binder type for an integration
try {
  binder.sealPublicScope();
  binder.enableExportMode();
  binder.registerFactory<Foo>(() => Foo()); // throws!
} on ModuleConfigurationException catch (e) {
  print(e.moduleType); // null or the offending module type
}
Inheritance

Constructors

ModuleConfigurationException(String message, {Type? moduleType})
Create a module-configuration exception.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
message String
Human-readable description of the error.
finalinherited
moduleType Type?
The module type that is misconfigured, if applicable.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited