Exceptions#

Every error InitO raises derives from InitoError. They are raised at decoration time (invalid usage/metadata), at @Builder build time, or during dependency resolution — never silently. See Troubleshooting for worked examples of each.

Base#

class inito.InitoError[source]#

Base class for all inito errors.

Metadata and code generation#

class inito.exceptions.MetadataExtractionError[source]#

Raised when class metadata cannot be built at decoration time.

class inito.exceptions.AnnotationResolutionError[source]#

Raised when field type hints cannot be resolved.

class inito.exceptions.InvalidFieldDefinitionError[source]#

Raised when a field declaration is structurally invalid.

class inito.exceptions.CodeGenerationError[source]#

Raised when generated method source fails to compile or execute.

class inito.exceptions.DecoratorConfigurationError[source]#

Raised when decorator options are invalid or conflicting.

class inito.exceptions.DuplicateGeneratorError[source]#

Raised when a generator name collides in the registry.

Builder#

class inito.exceptions.BuilderValidationError[source]#

Raised when .build() is called before every required field is set.

Dependency injection#

class inito.exceptions.DependencyRegistrationError[source]#

Raised when @Service/@Singleton registration or its constructor annotations are invalid.

class inito.exceptions.UnresolvableDependencyError[source]#

Raised when a needed dependency type has no registration and no default value.

class inito.exceptions.CircularDependencyError[source]#

Raised when resolving a dependency graph revisits a class already mid-resolution.