-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy patherrors.py
More file actions
34 lines (32 loc) · 1.15 KB
/
errors.py
File metadata and controls
34 lines (32 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from pca.exceptions import (
ConfigError,
ErrorCatalog,
)
class DIErrors(ErrorCatalog):
DEFINITION_NOT_FOUND = ConfigError(
hint=(
"A dependency definition for DI was tried to be injected, but it has not been found."
)
)
ALREADY_REGISTERED = ConfigError(hint="This context has already been registered.")
AMBIGUOUS_DEFINITION = ConfigError(
hint=(
"A dependency definition must have exactly only one of the two: either the name "
"or the interface."
)
)
NO_IDENTIFIER_SPECIFIED = ConfigError(hint="Missing both name and interface for Inject.")
CONTRADICTORY_QUALIFIER_DEFINED = ConfigError(
hint=(
"Both `qualifier` value and `get_qualifier` factory should not be set on the same "
"DI context. Choose one."
)
)
INDETERMINATE_CONTEXT_BEING_RESOLVED = ConfigError(
hint=(
"The context has to be determined (i.e. called `determine(component)`) to be resolvable."
)
)
NO_CONTAINER_PROVIDED = ConfigError(
hint="DI resolving found no instance of the DI `Container` to work with."
)